Java 类org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.NamenodeRegistrationProto.NamenodeRoleProto 实例源码

项目:hadoop    文件:PBHelper.java   
public static NamenodeRole convert(NamenodeRoleProto role) {
  switch (role) {
  case NAMENODE:
    return NamenodeRole.NAMENODE;
  case BACKUP:
    return NamenodeRole.BACKUP;
  case CHECKPOINT:
    return NamenodeRole.CHECKPOINT;
  }
  return null;
}
项目:hadoop    文件:PBHelper.java   
public static NamenodeRoleProto convert(NamenodeRole role) {
  switch (role) {
  case NAMENODE:
    return NamenodeRoleProto.NAMENODE;
  case BACKUP:
    return NamenodeRoleProto.BACKUP;
  case CHECKPOINT:
    return NamenodeRoleProto.CHECKPOINT;
  }
  return null;
}
项目:hadoop    文件:TestPBHelper.java   
@Test
public void testConvertNamenodeRole() {
  assertEquals(NamenodeRoleProto.BACKUP,
      PBHelper.convert(NamenodeRole.BACKUP));
  assertEquals(NamenodeRoleProto.CHECKPOINT,
      PBHelper.convert(NamenodeRole.CHECKPOINT));
  assertEquals(NamenodeRoleProto.NAMENODE,
      PBHelper.convert(NamenodeRole.NAMENODE));
  assertEquals(NamenodeRole.BACKUP,
      PBHelper.convert(NamenodeRoleProto.BACKUP));
  assertEquals(NamenodeRole.CHECKPOINT,
      PBHelper.convert(NamenodeRoleProto.CHECKPOINT));
  assertEquals(NamenodeRole.NAMENODE,
      PBHelper.convert(NamenodeRoleProto.NAMENODE));
}
项目:big-c    文件:PBHelper.java   
public static NamenodeRole convert(NamenodeRoleProto role) {
  switch (role) {
  case NAMENODE:
    return NamenodeRole.NAMENODE;
  case BACKUP:
    return NamenodeRole.BACKUP;
  case CHECKPOINT:
    return NamenodeRole.CHECKPOINT;
  }
  return null;
}
项目:big-c    文件:PBHelper.java   
public static NamenodeRoleProto convert(NamenodeRole role) {
  switch (role) {
  case NAMENODE:
    return NamenodeRoleProto.NAMENODE;
  case BACKUP:
    return NamenodeRoleProto.BACKUP;
  case CHECKPOINT:
    return NamenodeRoleProto.CHECKPOINT;
  }
  return null;
}
项目:big-c    文件:TestPBHelper.java   
@Test
public void testConvertNamenodeRole() {
  assertEquals(NamenodeRoleProto.BACKUP,
      PBHelper.convert(NamenodeRole.BACKUP));
  assertEquals(NamenodeRoleProto.CHECKPOINT,
      PBHelper.convert(NamenodeRole.CHECKPOINT));
  assertEquals(NamenodeRoleProto.NAMENODE,
      PBHelper.convert(NamenodeRole.NAMENODE));
  assertEquals(NamenodeRole.BACKUP,
      PBHelper.convert(NamenodeRoleProto.BACKUP));
  assertEquals(NamenodeRole.CHECKPOINT,
      PBHelper.convert(NamenodeRoleProto.CHECKPOINT));
  assertEquals(NamenodeRole.NAMENODE,
      PBHelper.convert(NamenodeRoleProto.NAMENODE));
}
项目:hadoop-2.6.0-cdh5.4.3    文件:PBHelper.java   
public static NamenodeRole convert(NamenodeRoleProto role) {
  switch (role) {
  case NAMENODE:
    return NamenodeRole.NAMENODE;
  case BACKUP:
    return NamenodeRole.BACKUP;
  case CHECKPOINT:
    return NamenodeRole.CHECKPOINT;
  }
  return null;
}
项目:hadoop-2.6.0-cdh5.4.3    文件:PBHelper.java   
public static NamenodeRoleProto convert(NamenodeRole role) {
  switch (role) {
  case NAMENODE:
    return NamenodeRoleProto.NAMENODE;
  case BACKUP:
    return NamenodeRoleProto.BACKUP;
  case CHECKPOINT:
    return NamenodeRoleProto.CHECKPOINT;
  }
  return null;
}
项目:hadoop-2.6.0-cdh5.4.3    文件:TestPBHelper.java   
@Test
public void testConvertNamenodeRole() {
  assertEquals(NamenodeRoleProto.BACKUP,
      PBHelper.convert(NamenodeRole.BACKUP));
  assertEquals(NamenodeRoleProto.CHECKPOINT,
      PBHelper.convert(NamenodeRole.CHECKPOINT));
  assertEquals(NamenodeRoleProto.NAMENODE,
      PBHelper.convert(NamenodeRole.NAMENODE));
  assertEquals(NamenodeRole.BACKUP,
      PBHelper.convert(NamenodeRoleProto.BACKUP));
  assertEquals(NamenodeRole.CHECKPOINT,
      PBHelper.convert(NamenodeRoleProto.CHECKPOINT));
  assertEquals(NamenodeRole.NAMENODE,
      PBHelper.convert(NamenodeRoleProto.NAMENODE));
}
项目:hadoop-plus    文件:PBHelper.java   
public static NamenodeRole convert(NamenodeRoleProto role) {
  switch (role) {
  case NAMENODE:
    return NamenodeRole.NAMENODE;
  case BACKUP:
    return NamenodeRole.BACKUP;
  case CHECKPOINT:
    return NamenodeRole.CHECKPOINT;
  }
  return null;
}
项目:hadoop-plus    文件:PBHelper.java   
public static NamenodeRoleProto convert(NamenodeRole role) {
  switch (role) {
  case NAMENODE:
    return NamenodeRoleProto.NAMENODE;
  case BACKUP:
    return NamenodeRoleProto.BACKUP;
  case CHECKPOINT:
    return NamenodeRoleProto.CHECKPOINT;
  }
  return null;
}
项目:hadoop-plus    文件:TestPBHelper.java   
@Test
public void testConvertNamenodeRole() {
  assertEquals(NamenodeRoleProto.BACKUP,
      PBHelper.convert(NamenodeRole.BACKUP));
  assertEquals(NamenodeRoleProto.CHECKPOINT,
      PBHelper.convert(NamenodeRole.CHECKPOINT));
  assertEquals(NamenodeRoleProto.NAMENODE,
      PBHelper.convert(NamenodeRole.NAMENODE));
  assertEquals(NamenodeRole.BACKUP,
      PBHelper.convert(NamenodeRoleProto.BACKUP));
  assertEquals(NamenodeRole.CHECKPOINT,
      PBHelper.convert(NamenodeRoleProto.CHECKPOINT));
  assertEquals(NamenodeRole.NAMENODE,
      PBHelper.convert(NamenodeRoleProto.NAMENODE));
}
项目:FlexMap    文件:PBHelper.java   
public static NamenodeRole convert(NamenodeRoleProto role) {
  switch (role) {
  case NAMENODE:
    return NamenodeRole.NAMENODE;
  case BACKUP:
    return NamenodeRole.BACKUP;
  case CHECKPOINT:
    return NamenodeRole.CHECKPOINT;
  }
  return null;
}
项目:FlexMap    文件:PBHelper.java   
public static NamenodeRoleProto convert(NamenodeRole role) {
  switch (role) {
  case NAMENODE:
    return NamenodeRoleProto.NAMENODE;
  case BACKUP:
    return NamenodeRoleProto.BACKUP;
  case CHECKPOINT:
    return NamenodeRoleProto.CHECKPOINT;
  }
  return null;
}
项目:FlexMap    文件:TestPBHelper.java   
@Test
public void testConvertNamenodeRole() {
  assertEquals(NamenodeRoleProto.BACKUP,
      PBHelper.convert(NamenodeRole.BACKUP));
  assertEquals(NamenodeRoleProto.CHECKPOINT,
      PBHelper.convert(NamenodeRole.CHECKPOINT));
  assertEquals(NamenodeRoleProto.NAMENODE,
      PBHelper.convert(NamenodeRole.NAMENODE));
  assertEquals(NamenodeRole.BACKUP,
      PBHelper.convert(NamenodeRoleProto.BACKUP));
  assertEquals(NamenodeRole.CHECKPOINT,
      PBHelper.convert(NamenodeRoleProto.CHECKPOINT));
  assertEquals(NamenodeRole.NAMENODE,
      PBHelper.convert(NamenodeRoleProto.NAMENODE));
}
项目:hops    文件:PBHelper.java   
public static NamenodeRole convert(NamenodeRoleProto role) {
  switch (role) {
    case NAMENODE:
      return NamenodeRole.NAMENODE;
    case BACKUP:
      return NamenodeRole.BACKUP;
    case CHECKPOINT:
      return NamenodeRole.CHECKPOINT;
  }
  return null;
}
项目:hops    文件:PBHelper.java   
public static NamenodeRoleProto convert(NamenodeRole role) {
  switch (role) {
    case NAMENODE:
      return NamenodeRoleProto.NAMENODE;
    case BACKUP:
      return NamenodeRoleProto.BACKUP;
    case CHECKPOINT:
      return NamenodeRoleProto.CHECKPOINT;
  }
  return null;
}
项目:hops    文件:TestPBHelper.java   
@Test
public void testConvertNamenodeRole() {
  assertEquals(NamenodeRoleProto.BACKUP,
      PBHelper.convert(NamenodeRole.BACKUP));
  assertEquals(NamenodeRoleProto.CHECKPOINT,
      PBHelper.convert(NamenodeRole.CHECKPOINT));
  assertEquals(NamenodeRoleProto.NAMENODE,
      PBHelper.convert(NamenodeRole.NAMENODE));
  assertEquals(NamenodeRole.BACKUP,
      PBHelper.convert(NamenodeRoleProto.BACKUP));
  assertEquals(NamenodeRole.CHECKPOINT,
      PBHelper.convert(NamenodeRoleProto.CHECKPOINT));
  assertEquals(NamenodeRole.NAMENODE,
      PBHelper.convert(NamenodeRoleProto.NAMENODE));
}
项目:hadoop-TCP    文件:PBHelper.java   
public static NamenodeRole convert(NamenodeRoleProto role) {
  switch (role) {
  case NAMENODE:
    return NamenodeRole.NAMENODE;
  case BACKUP:
    return NamenodeRole.BACKUP;
  case CHECKPOINT:
    return NamenodeRole.CHECKPOINT;
  }
  return null;
}
项目:hadoop-TCP    文件:PBHelper.java   
public static NamenodeRoleProto convert(NamenodeRole role) {
  switch (role) {
  case NAMENODE:
    return NamenodeRoleProto.NAMENODE;
  case BACKUP:
    return NamenodeRoleProto.BACKUP;
  case CHECKPOINT:
    return NamenodeRoleProto.CHECKPOINT;
  }
  return null;
}
项目:hadoop-TCP    文件:TestPBHelper.java   
@Test
public void testConvertNamenodeRole() {
  assertEquals(NamenodeRoleProto.BACKUP,
      PBHelper.convert(NamenodeRole.BACKUP));
  assertEquals(NamenodeRoleProto.CHECKPOINT,
      PBHelper.convert(NamenodeRole.CHECKPOINT));
  assertEquals(NamenodeRoleProto.NAMENODE,
      PBHelper.convert(NamenodeRole.NAMENODE));
  assertEquals(NamenodeRole.BACKUP,
      PBHelper.convert(NamenodeRoleProto.BACKUP));
  assertEquals(NamenodeRole.CHECKPOINT,
      PBHelper.convert(NamenodeRoleProto.CHECKPOINT));
  assertEquals(NamenodeRole.NAMENODE,
      PBHelper.convert(NamenodeRoleProto.NAMENODE));
}
项目:hardfs    文件:PBHelper.java   
public static NamenodeRole convert(NamenodeRoleProto role) {
  switch (role) {
  case NAMENODE:
    return NamenodeRole.NAMENODE;
  case BACKUP:
    return NamenodeRole.BACKUP;
  case CHECKPOINT:
    return NamenodeRole.CHECKPOINT;
  }
  return null;
}
项目:hardfs    文件:PBHelper.java   
public static NamenodeRoleProto convert(NamenodeRole role) {
  switch (role) {
  case NAMENODE:
    return NamenodeRoleProto.NAMENODE;
  case BACKUP:
    return NamenodeRoleProto.BACKUP;
  case CHECKPOINT:
    return NamenodeRoleProto.CHECKPOINT;
  }
  return null;
}
项目:hardfs    文件:TestPBHelper.java   
@Test
public void testConvertNamenodeRole() {
  assertEquals(NamenodeRoleProto.BACKUP,
      PBHelper.convert(NamenodeRole.BACKUP));
  assertEquals(NamenodeRoleProto.CHECKPOINT,
      PBHelper.convert(NamenodeRole.CHECKPOINT));
  assertEquals(NamenodeRoleProto.NAMENODE,
      PBHelper.convert(NamenodeRole.NAMENODE));
  assertEquals(NamenodeRole.BACKUP,
      PBHelper.convert(NamenodeRoleProto.BACKUP));
  assertEquals(NamenodeRole.CHECKPOINT,
      PBHelper.convert(NamenodeRoleProto.CHECKPOINT));
  assertEquals(NamenodeRole.NAMENODE,
      PBHelper.convert(NamenodeRoleProto.NAMENODE));
}
项目:hadoop-on-lustre2    文件:PBHelper.java   
public static NamenodeRole convert(NamenodeRoleProto role) {
  switch (role) {
  case NAMENODE:
    return NamenodeRole.NAMENODE;
  case BACKUP:
    return NamenodeRole.BACKUP;
  case CHECKPOINT:
    return NamenodeRole.CHECKPOINT;
  }
  return null;
}
项目:hadoop-on-lustre2    文件:PBHelper.java   
public static NamenodeRoleProto convert(NamenodeRole role) {
  switch (role) {
  case NAMENODE:
    return NamenodeRoleProto.NAMENODE;
  case BACKUP:
    return NamenodeRoleProto.BACKUP;
  case CHECKPOINT:
    return NamenodeRoleProto.CHECKPOINT;
  }
  return null;
}
项目:hadoop-on-lustre2    文件:TestPBHelper.java   
@Test
public void testConvertNamenodeRole() {
  assertEquals(NamenodeRoleProto.BACKUP,
      PBHelper.convert(NamenodeRole.BACKUP));
  assertEquals(NamenodeRoleProto.CHECKPOINT,
      PBHelper.convert(NamenodeRole.CHECKPOINT));
  assertEquals(NamenodeRoleProto.NAMENODE,
      PBHelper.convert(NamenodeRole.NAMENODE));
  assertEquals(NamenodeRole.BACKUP,
      PBHelper.convert(NamenodeRoleProto.BACKUP));
  assertEquals(NamenodeRole.CHECKPOINT,
      PBHelper.convert(NamenodeRoleProto.CHECKPOINT));
  assertEquals(NamenodeRole.NAMENODE,
      PBHelper.convert(NamenodeRoleProto.NAMENODE));
}