Java 类org.apache.hadoop.hbase.avro.generated.AClusterStatus 实例源码

项目:LCIndex-HBase-0.94.16    文件:AvroServer.java   
public AClusterStatus getClusterStatus() throws AIOError {
     try {
return AvroUtil.csToACS(admin.getClusterStatus());
     } catch (IOException e) {
AIOError ioe = new AIOError();
ioe.message = new Utf8(e.getMessage());
       throw ioe;
     }
   }
项目:LCIndex-HBase-0.94.16    文件:AvroUtil.java   
static public AClusterStatus csToACS(ClusterStatus cs) throws IOException {
   AClusterStatus acs = new AClusterStatus();
   acs.averageLoad = cs.getAverageLoad();
   Collection<ServerName> deadServerNames = cs.getDeadServerNames();
   Schema stringArraySchema = Schema.createArray(Schema.create(Schema.Type.STRING));
   GenericData.Array<CharSequence> adeadServerNames = null;
   if (deadServerNames != null) {
     adeadServerNames = new GenericData.Array<CharSequence>(deadServerNames.size(), stringArraySchema);
     for (ServerName deadServerName : deadServerNames) {
adeadServerNames.add(new Utf8(deadServerName.toString()));
     }
   } else {
     adeadServerNames = new GenericData.Array<CharSequence>(0, stringArraySchema);
   }
   acs.deadServerNames = adeadServerNames;
   acs.deadServers = cs.getDeadServers();
   acs.hbaseVersion = new Utf8(cs.getHBaseVersion());
   acs.regionsCount = cs.getRegionsCount();
   acs.requestsCount = cs.getRequestsCount();
   Collection<ServerName> hserverInfos = cs.getServers();
   Schema s = Schema.createArray(AServerInfo.SCHEMA$);
   GenericData.Array<AServerInfo> aserverInfos = null;
   if (hserverInfos != null) {
     aserverInfos = new GenericData.Array<AServerInfo>(hserverInfos.size(), s);
     for (ServerName hsi : hserverInfos) {
aserverInfos.add(hsiToASI(hsi, cs.getLoad(hsi)));
     }
   } else {
     aserverInfos = new GenericData.Array<AServerInfo>(0, s);
   }
   acs.serverInfos = aserverInfos;
   acs.servers = cs.getServers().size();
   return acs;
 }
项目:IRIndex    文件:AvroServer.java   
public AClusterStatus getClusterStatus() throws AIOError {
     try {
return AvroUtil.csToACS(admin.getClusterStatus());
     } catch (IOException e) {
AIOError ioe = new AIOError();
ioe.message = new Utf8(e.getMessage());
       throw ioe;
     }
   }
项目:IRIndex    文件:AvroUtil.java   
static public AClusterStatus csToACS(ClusterStatus cs) throws IOException {
   AClusterStatus acs = new AClusterStatus();
   acs.averageLoad = cs.getAverageLoad();
   Collection<ServerName> deadServerNames = cs.getDeadServerNames();
   Schema stringArraySchema = Schema.createArray(Schema.create(Schema.Type.STRING));
   GenericData.Array<CharSequence> adeadServerNames = null;
   if (deadServerNames != null) {
     adeadServerNames = new GenericData.Array<CharSequence>(deadServerNames.size(), stringArraySchema);
     for (ServerName deadServerName : deadServerNames) {
adeadServerNames.add(new Utf8(deadServerName.toString()));
     }
   } else {
     adeadServerNames = new GenericData.Array<CharSequence>(0, stringArraySchema);
   }
   acs.deadServerNames = adeadServerNames;
   acs.deadServers = cs.getDeadServers();
   acs.hbaseVersion = new Utf8(cs.getHBaseVersion());
   acs.regionsCount = cs.getRegionsCount();
   acs.requestsCount = cs.getRequestsCount();
   Collection<ServerName> hserverInfos = cs.getServers();
   Schema s = Schema.createArray(AServerInfo.SCHEMA$);
   GenericData.Array<AServerInfo> aserverInfos = null;
   if (hserverInfos != null) {
     aserverInfos = new GenericData.Array<AServerInfo>(hserverInfos.size(), s);
     for (ServerName hsi : hserverInfos) {
aserverInfos.add(hsiToASI(hsi, cs.getLoad(hsi)));
     }
   } else {
     aserverInfos = new GenericData.Array<AServerInfo>(0, s);
   }
   acs.serverInfos = aserverInfos;
   acs.servers = cs.getServers().size();
   return acs;
 }
项目:RStore    文件:AvroServer.java   
public AClusterStatus getClusterStatus() throws AIOError {
     try {
return AvroUtil.csToACS(admin.getClusterStatus());
     } catch (IOException e) {
AIOError ioe = new AIOError();
ioe.message = new Utf8(e.getMessage());
       throw ioe;
     }
   }
项目:RStore    文件:AvroUtil.java   
static public AClusterStatus csToACS(ClusterStatus cs) throws IOException {
   AClusterStatus acs = new AClusterStatus();
   acs.averageLoad = cs.getAverageLoad();
   Collection<ServerName> deadServerNames = cs.getDeadServerNames();
   Schema stringArraySchema = Schema.createArray(Schema.create(Schema.Type.STRING));
   GenericData.Array<CharSequence> adeadServerNames = null;
   if (deadServerNames != null) {
     adeadServerNames = new GenericData.Array<CharSequence>(deadServerNames.size(), stringArraySchema);
     for (ServerName deadServerName : deadServerNames) {
adeadServerNames.add(new Utf8(deadServerName.toString()));
     }
   } else {
     adeadServerNames = new GenericData.Array<CharSequence>(0, stringArraySchema);
   }
   acs.deadServerNames = adeadServerNames;
   acs.deadServers = cs.getDeadServers();
   acs.hbaseVersion = new Utf8(cs.getHBaseVersion());
   acs.regionsCount = cs.getRegionsCount();
   acs.requestsCount = cs.getRequestsCount();
   Collection<ServerName> hserverInfos = cs.getServers();
   Schema s = Schema.createArray(AServerInfo.SCHEMA$);
   GenericData.Array<AServerInfo> aserverInfos = null;
   if (hserverInfos != null) {
     aserverInfos = new GenericData.Array<AServerInfo>(hserverInfos.size(), s);
     for (ServerName hsi : hserverInfos) {
aserverInfos.add(hsiToASI(hsi, cs.getLoad(hsi)));
     }
   } else {
     aserverInfos = new GenericData.Array<AServerInfo>(0, s);
   }
   acs.serverInfos = aserverInfos;
   acs.servers = cs.getServers().size();
   return acs;
 }
项目:HBase-Research    文件:AvroServer.java   
public AClusterStatus getClusterStatus() throws AIOError {
     try {
return AvroUtil.csToACS(admin.getClusterStatus());
     } catch (IOException e) {
AIOError ioe = new AIOError();
ioe.message = new Utf8(e.getMessage());
       throw ioe;
     }
   }
项目:HBase-Research    文件:AvroUtil.java   
static public AClusterStatus csToACS(ClusterStatus cs) throws IOException {
   AClusterStatus acs = new AClusterStatus();
   acs.averageLoad = cs.getAverageLoad();
   Collection<ServerName> deadServerNames = cs.getDeadServerNames();
   Schema stringArraySchema = Schema.createArray(Schema.create(Schema.Type.STRING));
   GenericData.Array<CharSequence> adeadServerNames = null;
   if (deadServerNames != null) {
     adeadServerNames = new GenericData.Array<CharSequence>(deadServerNames.size(), stringArraySchema);
     for (ServerName deadServerName : deadServerNames) {
adeadServerNames.add(new Utf8(deadServerName.toString()));
     }
   } else {
     adeadServerNames = new GenericData.Array<CharSequence>(0, stringArraySchema);
   }
   acs.deadServerNames = adeadServerNames;
   acs.deadServers = cs.getDeadServers();
   acs.hbaseVersion = new Utf8(cs.getHBaseVersion());
   acs.regionsCount = cs.getRegionsCount();
   acs.requestsCount = cs.getRequestsCount();
   Collection<ServerName> hserverInfos = cs.getServers();
   Schema s = Schema.createArray(AServerInfo.SCHEMA$);
   GenericData.Array<AServerInfo> aserverInfos = null;
   if (hserverInfos != null) {
     aserverInfos = new GenericData.Array<AServerInfo>(hserverInfos.size(), s);
     for (ServerName hsi : hserverInfos) {
aserverInfos.add(hsiToASI(hsi, cs.getLoad(hsi)));
     }
   } else {
     aserverInfos = new GenericData.Array<AServerInfo>(0, s);
   }
   acs.serverInfos = aserverInfos;
   acs.servers = cs.getServers().size();
   return acs;
 }
项目:hbase-0.94.8-qod    文件:AvroServer.java   
public AClusterStatus getClusterStatus() throws AIOError {
     try {
return AvroUtil.csToACS(admin.getClusterStatus());
     } catch (IOException e) {
AIOError ioe = new AIOError();
ioe.message = new Utf8(e.getMessage());
       throw ioe;
     }
   }
项目:hbase-0.94.8-qod    文件:AvroUtil.java   
static public AClusterStatus csToACS(ClusterStatus cs) throws IOException {
   AClusterStatus acs = new AClusterStatus();
   acs.averageLoad = cs.getAverageLoad();
   Collection<ServerName> deadServerNames = cs.getDeadServerNames();
   Schema stringArraySchema = Schema.createArray(Schema.create(Schema.Type.STRING));
   GenericData.Array<CharSequence> adeadServerNames = null;
   if (deadServerNames != null) {
     adeadServerNames = new GenericData.Array<CharSequence>(deadServerNames.size(), stringArraySchema);
     for (ServerName deadServerName : deadServerNames) {
adeadServerNames.add(new Utf8(deadServerName.toString()));
     }
   } else {
     adeadServerNames = new GenericData.Array<CharSequence>(0, stringArraySchema);
   }
   acs.deadServerNames = adeadServerNames;
   acs.deadServers = cs.getDeadServers();
   acs.hbaseVersion = new Utf8(cs.getHBaseVersion());
   acs.regionsCount = cs.getRegionsCount();
   acs.requestsCount = cs.getRequestsCount();
   Collection<ServerName> hserverInfos = cs.getServers();
   Schema s = Schema.createArray(AServerInfo.SCHEMA$);
   GenericData.Array<AServerInfo> aserverInfos = null;
   if (hserverInfos != null) {
     aserverInfos = new GenericData.Array<AServerInfo>(hserverInfos.size(), s);
     for (ServerName hsi : hserverInfos) {
aserverInfos.add(hsiToASI(hsi, cs.getLoad(hsi)));
     }
   } else {
     aserverInfos = new GenericData.Array<AServerInfo>(0, s);
   }
   acs.serverInfos = aserverInfos;
   acs.servers = cs.getServers().size();
   return acs;
 }
项目:hbase-0.94.8-qod    文件:AvroServer.java   
public AClusterStatus getClusterStatus() throws AIOError {
     try {
return AvroUtil.csToACS(admin.getClusterStatus());
     } catch (IOException e) {
AIOError ioe = new AIOError();
ioe.message = new Utf8(e.getMessage());
       throw ioe;
     }
   }
项目:hbase-0.94.8-qod    文件:AvroUtil.java   
static public AClusterStatus csToACS(ClusterStatus cs) throws IOException {
   AClusterStatus acs = new AClusterStatus();
   acs.averageLoad = cs.getAverageLoad();
   Collection<ServerName> deadServerNames = cs.getDeadServerNames();
   Schema stringArraySchema = Schema.createArray(Schema.create(Schema.Type.STRING));
   GenericData.Array<CharSequence> adeadServerNames = null;
   if (deadServerNames != null) {
     adeadServerNames = new GenericData.Array<CharSequence>(deadServerNames.size(), stringArraySchema);
     for (ServerName deadServerName : deadServerNames) {
adeadServerNames.add(new Utf8(deadServerName.toString()));
     }
   } else {
     adeadServerNames = new GenericData.Array<CharSequence>(0, stringArraySchema);
   }
   acs.deadServerNames = adeadServerNames;
   acs.deadServers = cs.getDeadServers();
   acs.hbaseVersion = new Utf8(cs.getHBaseVersion());
   acs.regionsCount = cs.getRegionsCount();
   acs.requestsCount = cs.getRequestsCount();
   Collection<ServerName> hserverInfos = cs.getServers();
   Schema s = Schema.createArray(AServerInfo.SCHEMA$);
   GenericData.Array<AServerInfo> aserverInfos = null;
   if (hserverInfos != null) {
     aserverInfos = new GenericData.Array<AServerInfo>(hserverInfos.size(), s);
     for (ServerName hsi : hserverInfos) {
aserverInfos.add(hsiToASI(hsi, cs.getLoad(hsi)));
     }
   } else {
     aserverInfos = new GenericData.Array<AServerInfo>(0, s);
   }
   acs.serverInfos = aserverInfos;
   acs.servers = cs.getServers().size();
   return acs;
 }
项目:hindex    文件:AvroServer.java   
public AClusterStatus getClusterStatus() throws AIOError {
     try {
return AvroUtil.csToACS(admin.getClusterStatus());
     } catch (IOException e) {
AIOError ioe = new AIOError();
ioe.message = new Utf8(e.getMessage());
       throw ioe;
     }
   }
项目:hindex    文件:AvroUtil.java   
static public AClusterStatus csToACS(ClusterStatus cs) throws IOException {
   AClusterStatus acs = new AClusterStatus();
   acs.averageLoad = cs.getAverageLoad();
   Collection<ServerName> deadServerNames = cs.getDeadServerNames();
   Schema stringArraySchema = Schema.createArray(Schema.create(Schema.Type.STRING));
   GenericData.Array<CharSequence> adeadServerNames = null;
   if (deadServerNames != null) {
     adeadServerNames = new GenericData.Array<CharSequence>(deadServerNames.size(), stringArraySchema);
     for (ServerName deadServerName : deadServerNames) {
adeadServerNames.add(new Utf8(deadServerName.toString()));
     }
   } else {
     adeadServerNames = new GenericData.Array<CharSequence>(0, stringArraySchema);
   }
   acs.deadServerNames = adeadServerNames;
   acs.deadServers = cs.getDeadServers();
   acs.hbaseVersion = new Utf8(cs.getHBaseVersion());
   acs.regionsCount = cs.getRegionsCount();
   acs.requestsCount = cs.getRequestsCount();
   Collection<ServerName> hserverInfos = cs.getServers();
   Schema s = Schema.createArray(AServerInfo.SCHEMA$);
   GenericData.Array<AServerInfo> aserverInfos = null;
   if (hserverInfos != null) {
     aserverInfos = new GenericData.Array<AServerInfo>(hserverInfos.size(), s);
     for (ServerName hsi : hserverInfos) {
aserverInfos.add(hsiToASI(hsi, cs.getLoad(hsi)));
     }
   } else {
     aserverInfos = new GenericData.Array<AServerInfo>(0, s);
   }
   acs.serverInfos = aserverInfos;
   acs.servers = cs.getServers().size();
   return acs;
 }