本文整理汇总了Java中org.apache.hadoop.hbase.regionserver.DeleteTracker.DeleteResult类的典型用法代码示例。如果您正苦于以下问题:Java DeleteResult类的具体用法?Java DeleteResult怎么用?Java DeleteResult使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DeleteResult类属于org.apache.hadoop.hbase.regionserver.DeleteTracker包,在下文中一共展示了DeleteResult类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testDelete_DeleteColumn
import org.apache.hadoop.hbase.regionserver.DeleteTracker.DeleteResult; //导入依赖的package包/类
public void testDelete_DeleteColumn() {
byte [] qualifier = Bytes.toBytes("qualifier");
deleteType = KeyValue.Type.Delete.getCode();
KeyValue kv = new KeyValue(Bytes.toBytes("row"), Bytes.toBytes("f"),
qualifier, timestamp, KeyValue.Type.Delete);
sdt.add(kv);
timestamp -= 5;
kv = new KeyValue(Bytes.toBytes("row"), Bytes.toBytes("f"),
qualifier, timestamp, KeyValue.Type.DeleteColumn);
deleteType = KeyValue.Type.DeleteColumn.getCode();
sdt.add(kv);
timestamp -= 5;
kv = new KeyValue(Bytes.toBytes("row"), Bytes.toBytes("f"),
qualifier, timestamp, KeyValue.Type.DeleteColumn);
DeleteResult ret = sdt.isDeleted(kv);
assertEquals(DeleteResult.COLUMN_DELETED, ret);
}
示例2: testDeleteColumn_Delete
import org.apache.hadoop.hbase.regionserver.DeleteTracker.DeleteResult; //导入依赖的package包/类
public void testDeleteColumn_Delete() {
byte [] qualifier = Bytes.toBytes("qualifier");
deleteType = KeyValue.Type.DeleteColumn.getCode();
KeyValue kv = new KeyValue(Bytes.toBytes("row"), Bytes.toBytes("f"),
qualifier, timestamp, KeyValue.Type.DeleteColumn);
sdt.add(kv);
qualifier = Bytes.toBytes("qualifier1");
deleteType = KeyValue.Type.Delete.getCode();
kv = new KeyValue(Bytes.toBytes("row"), Bytes.toBytes("f"),
qualifier, timestamp, KeyValue.Type.Delete);
sdt.add(kv);
DeleteResult ret = sdt.isDeleted(kv);
assertEquals( DeleteResult.VERSION_DELETED, ret);
}
示例3: testDelete_KeepVersionZero
import org.apache.hadoop.hbase.regionserver.DeleteTracker.DeleteResult; //导入依赖的package包/类
public void testDelete_KeepVersionZero(){
byte [] qualifier = Bytes.toBytes("qualifier");
deleteType = KeyValue.Type.Delete.getCode();
long deleteTimestamp = 10;
long valueTimestamp = 0;
sdt.reset();
KeyValue kv = new KeyValue(Bytes.toBytes("row"), Bytes.toBytes("f"),
qualifier, deleteTimestamp, KeyValue.Type.Delete);
sdt.add(kv);
kv = new KeyValue(Bytes.toBytes("row"), Bytes.toBytes("f"),
qualifier, valueTimestamp, KeyValue.Type.Delete);
DeleteResult ret = sdt.isDeleted(kv);
assertEquals(DeleteResult.NOT_DELETED, ret);
}
示例4: testDeletedBy_Delete
import org.apache.hadoop.hbase.regionserver.DeleteTracker.DeleteResult; //导入依赖的package包/类
public void testDeletedBy_Delete() {
KeyValue kv = new KeyValue(Bytes.toBytes("row"), Bytes.toBytes("f"),
Bytes.toBytes("qualifier"), timestamp, KeyValue.Type.Delete);
sdt.add(kv);
DeleteResult ret = sdt.isDeleted(kv);
assertEquals(DeleteResult.VERSION_DELETED, ret);
}
示例5: testDeletedBy_Delete
import org.apache.hadoop.hbase.regionserver.DeleteTracker.DeleteResult; //导入依赖的package包/类
public void testDeletedBy_Delete() {
byte [] qualifier = Bytes.toBytes("qualifier");
deleteType = KeyValue.Type.Delete.getCode();
sdt.add(qualifier, 0, qualifier.length, timestamp, deleteType);
DeleteResult ret = sdt.isDeleted(qualifier, 0, qualifier.length, timestamp);
assertEquals(DeleteResult.VERSION_DELETED, ret);
}
示例6: testDeletedBy_DeleteColumn
import org.apache.hadoop.hbase.regionserver.DeleteTracker.DeleteResult; //导入依赖的package包/类
public void testDeletedBy_DeleteColumn() {
byte [] qualifier = Bytes.toBytes("qualifier");
deleteType = KeyValue.Type.DeleteColumn.getCode();
sdt.add(qualifier, 0, qualifier.length, timestamp, deleteType);
timestamp -= 5;
DeleteResult ret = sdt.isDeleted(qualifier, 0, qualifier.length, timestamp);
assertEquals(DeleteResult.COLUMN_DELETED, ret);
}
示例7: testDeletedBy_DeleteFamily
import org.apache.hadoop.hbase.regionserver.DeleteTracker.DeleteResult; //导入依赖的package包/类
public void testDeletedBy_DeleteFamily() {
byte [] qualifier = Bytes.toBytes("qualifier");
deleteType = KeyValue.Type.DeleteFamily.getCode();
sdt.add(qualifier, 0, qualifier.length, timestamp, deleteType);
timestamp -= 5;
DeleteResult ret = sdt.isDeleted(qualifier, 0, qualifier.length, timestamp);
assertEquals(DeleteResult.FAMILY_DELETED, ret);
}
示例8: testDelete_DeleteColumn
import org.apache.hadoop.hbase.regionserver.DeleteTracker.DeleteResult; //导入依赖的package包/类
public void testDelete_DeleteColumn() {
byte [] qualifier = Bytes.toBytes("qualifier");
deleteType = KeyValue.Type.Delete.getCode();
sdt.add(qualifier, 0, qualifier.length, timestamp, deleteType);
timestamp -= 5;
deleteType = KeyValue.Type.DeleteColumn.getCode();
sdt.add(qualifier, 0, qualifier.length, timestamp, deleteType);
timestamp -= 5;
DeleteResult ret = sdt.isDeleted(qualifier, 0, qualifier.length, timestamp);
assertEquals(DeleteResult.COLUMN_DELETED, ret);
}
示例9: testDeleteColumn_Delete
import org.apache.hadoop.hbase.regionserver.DeleteTracker.DeleteResult; //导入依赖的package包/类
public void testDeleteColumn_Delete() {
byte [] qualifier = Bytes.toBytes("qualifier");
deleteType = KeyValue.Type.DeleteColumn.getCode();
sdt.add(qualifier, 0, qualifier.length, timestamp, deleteType);
qualifier = Bytes.toBytes("qualifier1");
deleteType = KeyValue.Type.Delete.getCode();
sdt.add(qualifier, 0, qualifier.length, timestamp, deleteType);
DeleteResult ret = sdt.isDeleted(qualifier, 0, qualifier.length, timestamp);
assertEquals( DeleteResult.VERSION_DELETED, ret);
}
示例10: testDelete_KeepVersionZero
import org.apache.hadoop.hbase.regionserver.DeleteTracker.DeleteResult; //导入依赖的package包/类
public void testDelete_KeepVersionZero(){
byte [] qualifier = Bytes.toBytes("qualifier");
deleteType = KeyValue.Type.Delete.getCode();
long deleteTimestamp = 10;
long valueTimestamp = 0;
sdt.reset();
sdt.add(qualifier, 0, qualifier.length, deleteTimestamp, deleteType);
DeleteResult ret = sdt.isDeleted(qualifier, 0, qualifier.length, valueTimestamp);
assertEquals(DeleteResult.NOT_DELETED, ret);
}
示例11: testDeletedBy_DeleteColumn
import org.apache.hadoop.hbase.regionserver.DeleteTracker.DeleteResult; //导入依赖的package包/类
public void testDeletedBy_DeleteColumn() {
KeyValue kv = new KeyValue(Bytes.toBytes("row"), Bytes.toBytes("f"),
Bytes.toBytes("qualifier"), timestamp, KeyValue.Type.DeleteColumn);
sdt.add(kv);
timestamp -= 5;
kv = new KeyValue(Bytes.toBytes("row"), Bytes.toBytes("f"),
Bytes.toBytes("qualifier"), timestamp , KeyValue.Type.DeleteColumn);
DeleteResult ret = sdt.isDeleted(kv);
assertEquals(DeleteResult.COLUMN_DELETED, ret);
}
示例12: testDeletedBy_DeleteFamily
import org.apache.hadoop.hbase.regionserver.DeleteTracker.DeleteResult; //导入依赖的package包/类
public void testDeletedBy_DeleteFamily() {
KeyValue kv = new KeyValue(Bytes.toBytes("row"), Bytes.toBytes("f"),
Bytes.toBytes("qualifier"), timestamp, KeyValue.Type.DeleteFamily);
sdt.add(kv);
timestamp -= 5;
kv = new KeyValue(Bytes.toBytes("row"), Bytes.toBytes("f"),
Bytes.toBytes("qualifier"), timestamp , KeyValue.Type.DeleteColumn);
DeleteResult ret = sdt.isDeleted(kv);
assertEquals(DeleteResult.FAMILY_DELETED, ret);
}
示例13: testDeletedBy_DeleteFamilyVersion
import org.apache.hadoop.hbase.regionserver.DeleteTracker.DeleteResult; //导入依赖的package包/类
public void testDeletedBy_DeleteFamilyVersion() {
byte [] qualifier1 = Bytes.toBytes("qualifier1");
byte [] qualifier2 = Bytes.toBytes("qualifier2");
byte [] qualifier3 = Bytes.toBytes("qualifier3");
byte [] qualifier4 = Bytes.toBytes("qualifier4");
deleteType = KeyValue.Type.DeleteFamilyVersion.getCode();
sdt.add(null, 0, 0, timestamp, deleteType);
DeleteResult ret = sdt.isDeleted(qualifier1, 0, qualifier1.length, timestamp);
assertEquals(DeleteResult.FAMILY_VERSION_DELETED, ret);
ret = sdt.isDeleted(qualifier2, 0, qualifier2.length, timestamp);
assertEquals(DeleteResult.FAMILY_VERSION_DELETED, ret);
ret = sdt.isDeleted(qualifier3, 0, qualifier3.length, timestamp);
assertEquals(DeleteResult.FAMILY_VERSION_DELETED, ret);
ret = sdt.isDeleted(qualifier4, 0, qualifier4.length, timestamp);
assertEquals(DeleteResult.FAMILY_VERSION_DELETED, ret);
ret = sdt.isDeleted(qualifier1, 0, qualifier1.length, timestamp + 3);
assertEquals(DeleteResult.NOT_DELETED, ret);
ret = sdt.isDeleted(qualifier2, 0, qualifier2.length, timestamp - 2);
assertEquals(DeleteResult.NOT_DELETED, ret);
ret = sdt.isDeleted(qualifier3, 0, qualifier3.length, timestamp - 5);
assertEquals(DeleteResult.NOT_DELETED, ret);
ret = sdt.isDeleted(qualifier4, 0, qualifier4.length, timestamp + 8);
assertEquals(DeleteResult.NOT_DELETED, ret);
}