Skip to content

Commit

Permalink
Merge HIVE-8971 - HIVE-8965 exposed some classes which start with Tes…
Browse files Browse the repository at this point in the history
…t but are not tests (Brock reviewed by Xuefu)

git-svn-id: https://svn.apache.org/repos/asf/hive/branches/spark@1641908 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
Brock Noland committed Nov 26, 2014
1 parent d40f9cb commit 7492451
Show file tree
Hide file tree
Showing 23 changed files with 36 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* First returns a url for a blank DB, then returns a URL for the original DB.
* For testing the feature in url_hook.q
*/
public class TestURLHook implements JDOConnectionURLHook {
public class SampleURLHook implements JDOConnectionURLHook {

private String originalUrl;

Expand Down
2 changes: 1 addition & 1 deletion contrib/src/test/queries/clientpositive/url_hook.q
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
add jar ${system:maven.local.repository}/org/apache/hive/hive-contrib/${system:hive.version}/hive-contrib-${system:hive.version}.jar;
SHOW TABLES 'src';

set hive.metastore.ds.connection.url.hook=org.apache.hadoop.hive.contrib.metastore.hooks.TestURLHook;
set hive.metastore.ds.connection.url.hook=org.apache.hadoop.hive.contrib.metastore.hooks.SampleURLHook;
-- changes to dummy derby store.. should return empty result
SHOW TABLES 'src';
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import java.util.Arrays;
import java.util.List;

public class TestHBaseKeyFactory extends DefaultHBaseKeyFactory {
public class SampleHBaseKeyFactory extends DefaultHBaseKeyFactory {

private static final String DELIMITER_PATTERN = "\\$\\$";
private static final byte[] DELIMITER_BINARY = "$$".getBytes();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
import java.util.List;
import java.util.Map;

public class TestHBaseKeyFactory2 extends AbstractHBaseKeyFactory {
public class SampleHBaseKeyFactory2 extends AbstractHBaseKeyFactory {

private static final int FIXED_LENGTH = 10;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,26 +37,26 @@
import org.apache.hadoop.mapred.JobConf;

/**
* Simple extension of {@link TestHBaseKeyFactory2} with exception of using filters instead of start
* Simple extension of {@link SampleHBaseKeyFactory2} with exception of using filters instead of start
* and stop keys
* */
public class TestHBaseKeyFactory3 extends TestHBaseKeyFactory2 {
public class SampleHBaseKeyFactory3 extends SampleHBaseKeyFactory2 {

@Override
public DecomposedPredicate decomposePredicate(JobConf jobConf, Deserializer deserializer,
ExprNodeDesc predicate) {
TestHBasePredicateDecomposer decomposedPredicate = new TestHBasePredicateDecomposer(keyMapping);
SampleHBasePredicateDecomposer decomposedPredicate = new SampleHBasePredicateDecomposer(keyMapping);
return decomposedPredicate.decomposePredicate(keyMapping.columnName, predicate);
}
}

class TestHBasePredicateDecomposer extends AbstractHBaseKeyPredicateDecomposer {
class SampleHBasePredicateDecomposer extends AbstractHBaseKeyPredicateDecomposer {

private static final int FIXED_LENGTH = 10;

private ColumnMapping keyMapping;

TestHBasePredicateDecomposer(ColumnMapping keyMapping) {
SampleHBasePredicateDecomposer(ColumnMapping keyMapping) {
this.keyMapping = keyMapping;
}

Expand Down
2 changes: 1 addition & 1 deletion hbase-handler/src/test/queries/positive/hbase_custom_key.q
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES (
"hbase.table.name" = "hbase_custom",
"hbase.columns.mapping" = ":key,cf:string",
"hbase.composite.key.factory"="org.apache.hadoop.hive.hbase.TestHBaseKeyFactory");
"hbase.composite.key.factory"="org.apache.hadoop.hive.hbase.SampleHBaseKeyFactory");

CREATE EXTERNAL TABLE hbase_ck_2(key string, value string)
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES (
"hbase.table.name" = "hbase_custom2",
"hbase.columns.mapping" = ":key,cf:string",
"hbase.composite.key.factory"="org.apache.hadoop.hive.hbase.TestHBaseKeyFactory2");
"hbase.composite.key.factory"="org.apache.hadoop.hive.hbase.SampleHBaseKeyFactory2");

from src tablesample (5 rows)
insert into table hbase_ck_4 select
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES (
"hbase.table.name" = "hbase_custom3",
"hbase.columns.mapping" = ":key,cf:string",
"hbase.composite.key.factory"="org.apache.hadoop.hive.hbase.TestHBaseKeyFactory3");
"hbase.composite.key.factory"="org.apache.hadoop.hive.hbase.SampleHBaseKeyFactory3");

from src tablesample (5 rows)
insert into table hbase_ck_5 select
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES (
"hbase.table.name" = "hbase_custom",
"hbase.columns.mapping" = ":key,cf:string",
"hbase.composite.key.factory"="org.apache.hadoop.hive.hbase.TestHBaseKeyFactory")
"hbase.composite.key.factory"="org.apache.hadoop.hive.hbase.SampleHBaseKeyFactory")
PREHOOK: type: CREATETABLE
PREHOOK: Output: database:default
PREHOOK: Output: default@hbase_ck_1
Expand All @@ -12,7 +12,7 @@ STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES (
"hbase.table.name" = "hbase_custom",
"hbase.columns.mapping" = ":key,cf:string",
"hbase.composite.key.factory"="org.apache.hadoop.hive.hbase.TestHBaseKeyFactory")
"hbase.composite.key.factory"="org.apache.hadoop.hive.hbase.SampleHBaseKeyFactory")
POSTHOOK: type: CREATETABLE
POSTHOOK: Output: database:default
POSTHOOK: Output: default@hbase_ck_1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES (
"hbase.table.name" = "hbase_custom2",
"hbase.columns.mapping" = ":key,cf:string",
"hbase.composite.key.factory"="org.apache.hadoop.hive.hbase.TestHBaseKeyFactory2")
"hbase.composite.key.factory"="org.apache.hadoop.hive.hbase.SampleHBaseKeyFactory2")
PREHOOK: type: CREATETABLE
PREHOOK: Output: database:default
PREHOOK: Output: default@hbase_ck_4
Expand All @@ -12,7 +12,7 @@ STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES (
"hbase.table.name" = "hbase_custom2",
"hbase.columns.mapping" = ":key,cf:string",
"hbase.composite.key.factory"="org.apache.hadoop.hive.hbase.TestHBaseKeyFactory2")
"hbase.composite.key.factory"="org.apache.hadoop.hive.hbase.SampleHBaseKeyFactory2")
POSTHOOK: type: CREATETABLE
POSTHOOK: Output: database:default
POSTHOOK: Output: default@hbase_ck_4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES (
"hbase.table.name" = "hbase_custom3",
"hbase.columns.mapping" = ":key,cf:string",
"hbase.composite.key.factory"="org.apache.hadoop.hive.hbase.TestHBaseKeyFactory3")
"hbase.composite.key.factory"="org.apache.hadoop.hive.hbase.SampleHBaseKeyFactory3")
PREHOOK: type: CREATETABLE
PREHOOK: Output: database:default
PREHOOK: Output: default@hbase_ck_5
Expand All @@ -12,7 +12,7 @@ STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES (
"hbase.table.name" = "hbase_custom3",
"hbase.columns.mapping" = ":key,cf:string",
"hbase.composite.key.factory"="org.apache.hadoop.hive.hbase.TestHBaseKeyFactory3")
"hbase.composite.key.factory"="org.apache.hadoop.hive.hbase.SampleHBaseKeyFactory3")
POSTHOOK: type: CREATETABLE
POSTHOOK: Output: database:default
POSTHOOK: Output: default@hbase_ck_5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
* subclasses that set the mode and the tests here get run as part of their
* testing.
*/
public abstract class TestAuthorizationApiAuthorizer {
public abstract class AbstractTestAuthorizationApiAuthorizer {
protected static boolean isRemoteMetastoreMode;
private static HiveConf hiveConf;
private static HiveMetaStoreClient msc;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
import org.junit.BeforeClass;

/**
* Test {@link TestAuthorizationApiAuthorizer} in embedded mode of metastore
* Test {@link AbstractTestAuthorizationApiAuthorizer} in embedded mode of metastore
*/
public class TestAuthzApiEmbedAuthorizerInEmbed extends TestAuthorizationApiAuthorizer {
public class TestAuthzApiEmbedAuthorizerInEmbed extends AbstractTestAuthorizationApiAuthorizer {

@BeforeClass
public static void setup() throws Exception {
isRemoteMetastoreMode = false; // embedded metastore mode
TestAuthorizationApiAuthorizer.setup();
AbstractTestAuthorizationApiAuthorizer.setup();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
import org.junit.BeforeClass;

/**
* Test {@link TestAuthorizationApiAuthorizer} in remote mode of metastore
* Test {@link AbstractTestAuthorizationApiAuthorizer} in remote mode of metastore
*/
public class TestAuthzApiEmbedAuthorizerInRemote extends TestAuthorizationApiAuthorizer {
public class TestAuthzApiEmbedAuthorizerInRemote extends AbstractTestAuthorizationApiAuthorizer {

@BeforeClass
public static void setup() throws Exception {
isRemoteMetastoreMode = true; // remote metastore mode
TestAuthorizationApiAuthorizer.setup();
AbstractTestAuthorizationApiAuthorizer.setup();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@
* use case from hive server 2, we need a session simulation.
*
*/
public class TestTezSessionState extends TezSessionState {
public class SampleTezSessionState extends TezSessionState {

private boolean open;
private final String sessionId;
private HiveConf hiveConf;
private String user;
private boolean doAsEnabled;

public TestTezSessionState(String sessionId) {
public SampleTezSessionState(String sessionId) {
super(sessionId);
this.sessionId = sessionId;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public TestTezSessionPoolManager() {

@Override
public TezSessionState createSession(String sessionId) {
return new TestTezSessionState(sessionId);
return new SampleTezSessionState(sessionId);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
import org.apache.hadoop.hive.serde2.typeinfo.TypeInfoFactory;
import org.junit.Assert;

public abstract class TestGenericUDFOPNumeric {
public TestGenericUDFOPNumeric() {
public abstract class AbstractTestGenericUDFOPNumeric {
public AbstractTestGenericUDFOPNumeric() {
// Arithmetic operations rely on getting conf from SessionState, need to initialize here.
SessionState ss = new SessionState(new HiveConf());
ss.getConf().setVar(HiveConf.ConfVars.HIVE_COMPAT, "latest");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
import org.junit.Assert;
import org.junit.Test;

public class TestGenericUDFOPDivide extends TestGenericUDFOPNumeric {
public class TestGenericUDFOPDivide extends AbstractTestGenericUDFOPNumeric {

@Test
public void testByteDivideShort() throws HiveException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
import org.junit.Assert;
import org.junit.Test;

public class TestGenericUDFOPMinus extends TestGenericUDFOPNumeric {
public class TestGenericUDFOPMinus extends AbstractTestGenericUDFOPNumeric {

@Test
public void testByteMinusShort() throws HiveException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
import org.junit.Assert;
import org.junit.Test;

public class TestGenericUDFOPMod extends TestGenericUDFOPNumeric {
public class TestGenericUDFOPMod extends AbstractTestGenericUDFOPNumeric {

@Test
public void testModByZero1() throws HiveException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
import org.junit.Assert;
import org.junit.Test;

public class TestGenericUDFOPMultiply extends TestGenericUDFOPNumeric {
public class TestGenericUDFOPMultiply extends AbstractTestGenericUDFOPNumeric {

@Test
public void testByteTimesShort() throws HiveException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
import org.junit.Assert;
import org.junit.Test;

public class TestGenericUDFOPPlus extends TestGenericUDFOPNumeric {
public class TestGenericUDFOPPlus extends AbstractTestGenericUDFOPNumeric {

@Test
public void testBytePlusShort() throws HiveException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
import org.junit.Assert;
import org.junit.Test;

public class TestGenericUDFPosMod extends TestGenericUDFOPNumeric {
public class TestGenericUDFPosMod extends AbstractTestGenericUDFOPNumeric {

@Test
public void testPosModByZero1() throws HiveException {
Expand Down

0 comments on commit 7492451

Please sign in to comment.