@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))); }
@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))); }
@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); }
@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); } }
@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))); }
@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))); }
@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); }
/** test Writable */ public void testWritable() throws Exception { UnixUserGroupInformation ugi = new UnixUserGroupInformation( USER_NAME, GROUP_NAMES); TestWritable.testWritable(ugi, new Configuration()); }