本文整理汇总了Java中org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.EmptyMsg类的典型用法代码示例。如果您正苦于以下问题:Java EmptyMsg类的具体用法?Java EmptyMsg怎么用?Java EmptyMsg使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EmptyMsg类属于org.apache.hadoop.hbase.protobuf.generated.HBaseProtos包,在下文中一共展示了EmptyMsg类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testRowCountWithInvalidRange1
import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.EmptyMsg; //导入依赖的package包/类
/**
* This will test the row count with startrow > endrow. The result should be
* -1.
* @throws Throwable
*/
@Test (timeout=300000)
public void testRowCountWithInvalidRange1() {
AggregationClient aClient = new AggregationClient(conf);
Scan scan = new Scan();
scan.setStartRow(ROWS[5]);
scan.setStopRow(ROWS[2]);
final ColumnInterpreter<Long, Long, EmptyMsg, LongMsg, LongMsg> ci =
new LongColumnInterpreter();
long rowCount = -1;
try {
rowCount = aClient.rowCount(TEST_TABLE, ci, scan);
} catch (Throwable e) {
myLog.error("Exception thrown in the invalidRange method"
+ e.getStackTrace());
}
assertEquals(-1, rowCount);
}
示例2: testRowCountWithInvalidRange2
import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.EmptyMsg; //导入依赖的package包/类
/**
* This will test the row count with startrow = endrow and they will be
* non-null. The result should be 0, as it assumes a non-get query.
* @throws Throwable
*/
@Test (timeout=300000)
public void testRowCountWithInvalidRange2() {
AggregationClient aClient = new AggregationClient(conf);
Scan scan = new Scan();
scan.setStartRow(ROWS[5]);
scan.setStopRow(ROWS[5]);
final ColumnInterpreter<Long, Long, EmptyMsg, LongMsg, LongMsg> ci =
new LongColumnInterpreter();
long rowCount = -1;
try {
rowCount = aClient.rowCount(TEST_TABLE, ci, scan);
} catch (Throwable e) {
rowCount = 0;
}
assertEquals(0, rowCount);
}
示例3: testMaxWithInvalidRange
import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.EmptyMsg; //导入依赖的package包/类
@Test (timeout=300000)
public void testMaxWithInvalidRange() {
AggregationClient aClient = new AggregationClient(conf);
final ColumnInterpreter<Long, Long, EmptyMsg, LongMsg, LongMsg> ci =
new LongColumnInterpreter();
Scan scan = new Scan();
scan.setStartRow(ROWS[4]);
scan.setStopRow(ROWS[2]);
scan.addColumn(TEST_FAMILY, TEST_QUALIFIER);
long max = Long.MIN_VALUE;
try {
max = aClient.max(TEST_TABLE, ci, scan);
} catch (Throwable e) {
max = 0;
}
assertEquals(0, max);// control should go to the catch block
}
示例4: testMaxWithInvalidRange2
import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.EmptyMsg; //导入依赖的package包/类
@Test (timeout=300000)
public void testMaxWithInvalidRange2() throws Throwable {
long max = Long.MIN_VALUE;
Scan scan = new Scan();
scan.addColumn(TEST_FAMILY, TEST_QUALIFIER);
scan.setStartRow(ROWS[4]);
scan.setStopRow(ROWS[4]);
try {
AggregationClient aClient = new AggregationClient(conf);
final ColumnInterpreter<Long, Long, EmptyMsg, LongMsg, LongMsg> ci =
new LongColumnInterpreter();
max = aClient.max(TEST_TABLE, ci, scan);
} catch (Exception e) {
max = 0;
}
assertEquals(0, max);// control should go to the catch block
}
示例5: testMinWithValidRangeWithNullCF
import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.EmptyMsg; //导入依赖的package包/类
@Test (timeout=300000)
public void testMinWithValidRangeWithNullCF() {
AggregationClient aClient = new AggregationClient(conf);
Scan scan = new Scan();
scan.setStartRow(ROWS[5]);
scan.setStopRow(ROWS[15]);
final ColumnInterpreter<Long, Long, EmptyMsg, LongMsg, LongMsg> ci =
new LongColumnInterpreter();
Long min = null;
try {
min = aClient.min(TEST_TABLE, ci, scan);
} catch (Throwable e) {
}
assertEquals(null, min);// CP will throw an IOException about the
// null column family, and max will be set to 0
}
示例6: testMinWithInvalidRange
import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.EmptyMsg; //导入依赖的package包/类
@Test (timeout=300000)
public void testMinWithInvalidRange() {
AggregationClient aClient = new AggregationClient(conf);
Long min = null;
Scan scan = new Scan();
scan.addFamily(TEST_FAMILY);
scan.setStartRow(ROWS[4]);
scan.setStopRow(ROWS[2]);
final ColumnInterpreter<Long, Long, EmptyMsg, LongMsg, LongMsg> ci =
new LongColumnInterpreter();
try {
min = aClient.min(TEST_TABLE, ci, scan);
} catch (Throwable e) {
}
assertEquals(null, min);// control should go to the catch block
}
示例7: testSumWithInvalidRange
import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.EmptyMsg; //导入依赖的package包/类
@Test (timeout=300000)
public void testSumWithInvalidRange() {
AggregationClient aClient = new AggregationClient(conf);
Scan scan = new Scan();
scan.addFamily(TEST_FAMILY);
scan.setStartRow(ROWS[6]);
scan.setStopRow(ROWS[2]);
final ColumnInterpreter<Long, Long, EmptyMsg, LongMsg, LongMsg> ci =
new LongColumnInterpreter();
Long sum = null;
try {
sum = aClient.sum(TEST_TABLE, ci, scan);
} catch (Throwable e) {
}
assertEquals(null, sum);// control should go to the catch block
}
示例8: testAvgWithInvalidRange
import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.EmptyMsg; //导入依赖的package包/类
@Test (timeout=300000)
public void testAvgWithInvalidRange() {
AggregationClient aClient = new AggregationClient(conf);
Scan scan = new Scan();
scan.addColumn(TEST_FAMILY,TEST_QUALIFIER);
scan.setStartRow(ROWS[5]);
scan.setStopRow(ROWS[1]);
final ColumnInterpreter<Long, Long, EmptyMsg, LongMsg, LongMsg> ci =
new LongColumnInterpreter();
Double avg = null;
try {
avg = aClient.avg(TEST_TABLE, ci, scan);
} catch (Throwable e) {
}
assertEquals(null, avg);// control should go to the catch block
}
示例9: testStdWithValidRangeWithNullCF
import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.EmptyMsg; //导入依赖的package包/类
@Test (timeout=300000)
public void testStdWithValidRangeWithNullCF() {
AggregationClient aClient = new AggregationClient(conf);
Scan scan = new Scan();
scan.setStartRow(ROWS[6]);
scan.setStopRow(ROWS[17]);
final ColumnInterpreter<Long, Long, EmptyMsg, LongMsg, LongMsg> ci =
new LongColumnInterpreter();
Double std = null;
try {
std = aClient.std(TEST_TABLE, ci, scan);
} catch (Throwable e) {
}
assertEquals(null, std);// CP will throw an IOException about the
// null column family, and max will be set to 0
}
示例10: testStdWithValidRangeWithNullCF
import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.EmptyMsg; //导入依赖的package包/类
@Test(timeout = 300000)
public void testStdWithValidRangeWithNullCF() {
AggregationClient aClient = new AggregationClient(conf);
Scan scan = new Scan();
scan.setStartRow(ROWS[6]);
scan.setStopRow(ROWS[17]);
final ColumnInterpreter<Double, Double, EmptyMsg, DoubleMsg, DoubleMsg> ci =
new DoubleColumnInterpreter();
Double std = null;
try {
std = aClient.std(TEST_TABLE, ci, scan);
} catch (Throwable e) {
}
assertEquals(null, std);// CP will throw an IOException about the
// null column family, and max will be set to 0
}
示例11: testAvgWithInvalidRange
import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.EmptyMsg; //导入依赖的package包/类
@Test(timeout = 300000)
public void testAvgWithInvalidRange() {
AggregationClient aClient = new AggregationClient(conf);
Scan scan = new Scan();
scan.addColumn(TEST_FAMILY, TEST_QUALIFIER);
scan.setStartRow(ROWS[5]);
scan.setStopRow(ROWS[1]);
final ColumnInterpreter<Double, Double, EmptyMsg, DoubleMsg, DoubleMsg> ci =
new DoubleColumnInterpreter();
Double avg = null;
try {
avg = aClient.avg(TEST_TABLE, ci, scan);
} catch (Throwable e) {
}
assertEquals(null, avg);// control should go to the catch block
}
示例12: testMaxWithInvalidRange
import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.EmptyMsg; //导入依赖的package包/类
@Test (timeout=300000)
public void testMaxWithInvalidRange() {
AggregationClient aClient = new AggregationClient(conf);
final ColumnInterpreter<BigDecimal, BigDecimal, EmptyMsg, BigDecimalMsg, BigDecimalMsg> ci =
new BigDecimalColumnInterpreter();
Scan scan = new Scan();
scan.setStartRow(ROWS[4]);
scan.setStopRow(ROWS[2]);
scan.addColumn(TEST_FAMILY, TEST_QUALIFIER);
BigDecimal max = new BigDecimal(Long.MIN_VALUE);
;
try {
max = aClient.max(TEST_TABLE, ci, scan);
} catch (Throwable e) {
max = BigDecimal.ZERO;
}
assertEquals(BigDecimal.ZERO, max);// control should go to the catch block
}
示例13: testMaxWithInvalidRange2
import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.EmptyMsg; //导入依赖的package包/类
@Test (timeout=300000)
public void testMaxWithInvalidRange2() throws Throwable {
BigDecimal max = new BigDecimal(Long.MIN_VALUE);
Scan scan = new Scan();
scan.addColumn(TEST_FAMILY, TEST_QUALIFIER);
scan.setStartRow(ROWS[4]);
scan.setStopRow(ROWS[4]);
try {
AggregationClient aClient = new AggregationClient(conf);
final ColumnInterpreter<BigDecimal, BigDecimal, EmptyMsg, BigDecimalMsg, BigDecimalMsg> ci =
new BigDecimalColumnInterpreter();
max = aClient.max(TEST_TABLE, ci, scan);
} catch (Exception e) {
max = BigDecimal.ZERO;
}
assertEquals(BigDecimal.ZERO, max);// control should go to the catch block
}
示例14: testMinWithValidRangeWithNullCF
import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.EmptyMsg; //导入依赖的package包/类
@Test (timeout=300000)
public void testMinWithValidRangeWithNullCF() {
AggregationClient aClient = new AggregationClient(conf);
Scan scan = new Scan();
scan.setStartRow(ROWS[5]);
scan.setStopRow(ROWS[15]);
final ColumnInterpreter<BigDecimal, BigDecimal, EmptyMsg, BigDecimalMsg, BigDecimalMsg> ci =
new BigDecimalColumnInterpreter();
BigDecimal min = null;
try {
min = aClient.min(TEST_TABLE, ci, scan);
} catch (Throwable e) {
}
assertEquals(null, min);// CP will throw an IOException about the
// null column family, and max will be set to 0
}
示例15: testMinWithInvalidRange
import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.EmptyMsg; //导入依赖的package包/类
@Test (timeout=300000)
public void testMinWithInvalidRange() {
AggregationClient aClient = new AggregationClient(conf);
BigDecimal min = null;
Scan scan = new Scan();
scan.addFamily(TEST_FAMILY);
scan.setStartRow(ROWS[4]);
scan.setStopRow(ROWS[2]);
final ColumnInterpreter<BigDecimal, BigDecimal, EmptyMsg, BigDecimalMsg, BigDecimalMsg> ci =
new BigDecimalColumnInterpreter();
try {
min = aClient.min(TEST_TABLE, ci, scan);
} catch (Throwable e) {
}
assertEquals(null, min);// control should go to the catch block
}