本文整理汇总了Java中org.apache.hadoop.io.TestWritable.testWritable方法的典型用法代码示例。如果您正苦于以下问题:Java TestWritable.testWritable方法的具体用法?Java TestWritable.testWritable怎么用?Java TestWritable.testWritable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.hadoop.io.TestWritable
的用法示例。
在下文中一共展示了TestWritable.testWritable方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testWritable
import org.apache.hadoop.io.TestWritable; //导入方法依赖的package包/类
@Test
public void testWritable() throws Exception {
TestWritable.testWritable(new BlockTokenIdentifier());
BlockTokenSecretManager sm = new BlockTokenSecretManager(
blockKeyUpdateInterval, blockTokenLifetime, 0, "fake-pool", null);
TestWritable.testWritable(generateTokenId(sm, block1,
EnumSet.allOf(BlockTokenSecretManager.AccessMode.class)));
TestWritable.testWritable(generateTokenId(sm, block2,
EnumSet.of(BlockTokenSecretManager.AccessMode.WRITE)));
TestWritable.testWritable(generateTokenId(sm, block3,
EnumSet.noneOf(BlockTokenSecretManager.AccessMode.class)));
}
示例2: testWritable
import org.apache.hadoop.io.TestWritable; //导入方法依赖的package包/类
@Test
public void testWritable() throws Exception {
TestWritable.testWritable(new BlockTokenIdentifier());
BlockTokenSecretManager sm = new BlockTokenSecretManager(
blockKeyUpdateInterval, blockTokenLifetime, 0, 1, "fake-pool", null);
TestWritable.testWritable(generateTokenId(sm, block1,
EnumSet.allOf(BlockTokenIdentifier.AccessMode.class)));
TestWritable.testWritable(generateTokenId(sm, block2,
EnumSet.of(BlockTokenIdentifier.AccessMode.WRITE)));
TestWritable.testWritable(generateTokenId(sm, block3,
EnumSet.noneOf(BlockTokenIdentifier.AccessMode.class)));
}
示例3: testReadWrite
import org.apache.hadoop.io.TestWritable; //导入方法依赖的package包/类
@Test
public void testReadWrite() throws Exception {
MockQuery baseQuery = dataStore.newQuery();
baseQuery.setStartKey("start");
baseQuery.setLimit(42);
PartitionQueryImpl<String, MockPersistent>
query = new PartitionQueryImpl<>(baseQuery);
TestWritable.testWritable(query);
}
示例4: testReadWrite
import org.apache.hadoop.io.TestWritable; //导入方法依赖的package包/类
@Test
public void testReadWrite() throws Exception {
List<PartitionQuery<String, MockPersistent>> partitions =
getPartitions();
for(PartitionQuery<String, MockPersistent> partition : partitions) {
GoraInputSplit split = new GoraInputSplit(conf, partition);
TestWritable.testWritable(split);
}
}
示例5: testWritable
import org.apache.hadoop.io.TestWritable; //导入方法依赖的package包/类
@Test
public void testWritable() throws Exception {
TestWritable.testWritable(new BlockTokenIdentifier());
BlockTokenSecretManager sm =
new NameNodeBlockTokenSecretManager(blockKeyUpdateInterval,
blockTokenLifetime, "fake-pool", null, new MyLeaderNameSystem());
TestWritable.testWritable(generateTokenId(sm, block1,
EnumSet.allOf(BlockTokenSecretManager.AccessMode.class)));
TestWritable.testWritable(generateTokenId(sm, block2,
EnumSet.of(BlockTokenSecretManager.AccessMode.WRITE)));
TestWritable.testWritable(generateTokenId(sm, block3,
EnumSet.noneOf(BlockTokenSecretManager.AccessMode.class)));
}
示例6: testWritable
import org.apache.hadoop.io.TestWritable; //导入方法依赖的package包/类
@Test
public void testWritable() throws Exception {
TestWritable.testWritable(new BlockTokenIdentifier());
BlockTokenSecretManager sm = new BlockTokenSecretManager(true,
blockKeyUpdateInterval, blockTokenLifetime);
TestWritable.testWritable(generateTokenId(sm, block1, EnumSet
.allOf(BlockTokenSecretManager.AccessMode.class)));
TestWritable.testWritable(generateTokenId(sm, block2, EnumSet
.of(BlockTokenSecretManager.AccessMode.WRITE)));
TestWritable.testWritable(generateTokenId(sm, block3, EnumSet
.noneOf(BlockTokenSecretManager.AccessMode.class)));
}
示例7: testReadWrite
import org.apache.hadoop.io.TestWritable; //导入方法依赖的package包/类
@Test
public void testReadWrite() throws Exception {
MockQuery baseQuery = dataStore.newQuery();
baseQuery.setStartKey("start");
baseQuery.setLimit(42);
PartitionQueryImpl<String, MockPersistent>
query = new PartitionQueryImpl<String, MockPersistent>(baseQuery);
TestWritable.testWritable(query);
}
示例8: testWritable
import org.apache.hadoop.io.TestWritable; //导入方法依赖的package包/类
/** test Writable */
public void testWritable() throws Exception {
UnixUserGroupInformation ugi = new UnixUserGroupInformation(
USER_NAME, GROUP_NAMES);
TestWritable.testWritable(ugi, new Configuration());
}