Java 类org.apache.hadoop.io.TestWritable 实例源码

项目:hadoop    文件:TestBlockToken.java   
@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)));
}
项目:aliyun-oss-hadoop-fs    文件:TestBlockToken.java   
@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)));
}
项目:big-c    文件:TestBlockToken.java   
@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)));
}
项目:gora-boot    文件:TestPartitionQueryImpl.java   
@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);
}
项目:gora-boot    文件:TestGoraInputSplit.java   
@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);
  }
}
项目:hadoop-2.6.0-cdh5.4.3    文件:TestBlockToken.java   
@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)));
}
项目:hadoop-plus    文件:TestBlockToken.java   
@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)));
}
项目:FlexMap    文件:TestBlockToken.java   
@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)));
}
项目:hops    文件:TestBlockToken.java   
@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)));
}
项目:hadoop-TCP    文件:TestBlockToken.java   
@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)));
}
项目:hadoop-on-lustre    文件:TestBlockToken.java   
@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)));
}
项目:hardfs    文件:TestBlockToken.java   
@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)));
}
项目:hadoop-on-lustre2    文件:TestBlockToken.java   
@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)));
}
项目:gora    文件:TestPartitionQueryImpl.java   
@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);
}
项目:gora    文件:TestGoraInputSplit.java   
@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);
  }
}
项目:gora-0.3-simplified    文件:TestPartitionQueryImpl.java   
@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);
}
项目:gora-0.3-simplified    文件:TestGoraInputSplit.java   
@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);
  }
}
项目:cumulus    文件:TestBlockToken.java   
@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)));
}
项目:gora-oraclenosql    文件:TestPartitionQueryImpl.java   
@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);
}
项目:gora-oraclenosql    文件:TestGoraInputSplit.java   
@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);
  }
}
项目:hortonworks-extension    文件:TestBlockToken.java   
@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)));
}
项目:hortonworks-extension    文件:TestBlockToken.java   
@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)));
}
项目:hadoop-EAR    文件:TestUnixUserGroupInformation.java   
/** test Writable */
public void testWritable() throws Exception {
  UnixUserGroupInformation ugi = new UnixUserGroupInformation(
      USER_NAME, GROUP_NAMES);
  TestWritable.testWritable(ugi, new Configuration());
}
项目:RDFS    文件:TestUnixUserGroupInformation.java   
/** test Writable */
public void testWritable() throws Exception {
  UnixUserGroupInformation ugi = new UnixUserGroupInformation(
      USER_NAME, GROUP_NAMES);
  TestWritable.testWritable(ugi, new Configuration());
}
项目:hadoop-0.20    文件:TestUnixUserGroupInformation.java   
/** test Writable */
public void testWritable() throws Exception {
  UnixUserGroupInformation ugi = new UnixUserGroupInformation(
      USER_NAME, GROUP_NAMES);
  TestWritable.testWritable(ugi, new Configuration());
}
项目:hadoop-gpu    文件:TestUnixUserGroupInformation.java   
/** test Writable */
public void testWritable() throws Exception {
  UnixUserGroupInformation ugi = new UnixUserGroupInformation(
      USER_NAME, GROUP_NAMES);
  TestWritable.testWritable(ugi, new Configuration());
}