Java 类org.apache.hadoop.hdfs.server.namenode.UnsupportedActionException 实例源码

项目:aliyun-oss-hadoop-fs    文件:ECCommand.java   
@Override
protected void processOptions(LinkedList<String> args) throws IOException {
  if (!args.isEmpty()) {
    throw new HadoopIllegalArgumentException("Too many parameters");
  }

  FileSystem fs = FileSystem.get(getConf());
  if (fs instanceof DistributedFileSystem == false) {
    throw new UnsupportedActionException(
        "Erasure commands are only supported for the HDFS");
  }
  DistributedFileSystem dfs = (DistributedFileSystem) fs;

  ErasureCodingPolicy[] ecPolicies = dfs.getClient().getErasureCodingPolicies();
  StringBuilder sb = new StringBuilder();
  int i = 0;
  while (i < ecPolicies.length) {
    ErasureCodingPolicy ecPolicy = ecPolicies[i];
    sb.append(ecPolicy.getName());
    i++;
    if (i < ecPolicies.length) {
      sb.append(", ");
    }
  }
  out.println(sb.toString());
}
项目:hadoop    文件:Balancer.java   
private static void checkReplicationPolicyCompatibility(Configuration conf
    ) throws UnsupportedActionException {
  if (!(BlockPlacementPolicy.getInstance(conf, null, null, null) instanceof 
      BlockPlacementPolicyDefault)) {
    throw new UnsupportedActionException(
        "Balancer without BlockPlacementPolicyDefault");
  }
}
项目:aliyun-oss-hadoop-fs    文件:Balancer.java   
private static void checkReplicationPolicyCompatibility(Configuration conf
    ) throws UnsupportedActionException {
  BlockPlacementPolicies placementPolicies =
      new BlockPlacementPolicies(conf, null, null, null);
  if (!(placementPolicies.getPolicy(false) instanceof
      BlockPlacementPolicyDefault)) {
    throw new UnsupportedActionException(
        "Balancer without BlockPlacementPolicyDefault");
  }
}
项目:aliyun-oss-hadoop-fs    文件:ECCommand.java   
@Override
protected void processPath(PathData item) throws IOException {
  if (!(item.fs instanceof DistributedFileSystem)) {
    throw new UnsupportedActionException(
        "Erasure commands are only supported for the HDFS paths");
  }
}
项目:big-c    文件:Balancer.java   
private static void checkReplicationPolicyCompatibility(Configuration conf
    ) throws UnsupportedActionException {
  if (!(BlockPlacementPolicy.getInstance(conf, null, null, null) instanceof 
      BlockPlacementPolicyDefault)) {
    throw new UnsupportedActionException(
        "Balancer without BlockPlacementPolicyDefault");
  }
}
项目:hadoop-2.6.0-cdh5.4.3    文件:Balancer.java   
private static void checkReplicationPolicyCompatibility(Configuration conf
    ) throws UnsupportedActionException {
  if (!(BlockPlacementPolicy.getInstance(conf, null, null, null) instanceof 
      BlockPlacementPolicyDefault)) {
    throw new UnsupportedActionException(
        "Balancer without BlockPlacementPolicyDefault");
  }
}
项目:hadoop-plus    文件:Balancer.java   
private static void checkReplicationPolicyCompatibility(Configuration conf
    ) throws UnsupportedActionException {
  if (!(BlockPlacementPolicy.getInstance(conf, null, null) instanceof 
      BlockPlacementPolicyDefault)) {
    throw new UnsupportedActionException(
        "Balancer without BlockPlacementPolicyDefault");
  }
}
项目:FlexMap    文件:Balancer.java   
private static void checkReplicationPolicyCompatibility(Configuration conf
    ) throws UnsupportedActionException {
  if (!(BlockPlacementPolicy.getInstance(conf, null, null, null) instanceof 
      BlockPlacementPolicyDefault)) {
    throw new UnsupportedActionException(
        "Balancer without BlockPlacementPolicyDefault");
  }
}
项目:hops    文件:Balancer.java   
private static void checkReplicationPolicyCompatibility(Configuration conf)
    throws UnsupportedActionException {
  if (BlockPlacementPolicy.getInstance(conf, null, null).getClass() !=
      BlockPlacementPolicyDefault.class) {
    throw new UnsupportedActionException(
        "Balancer without BlockPlacementPolicyDefault");
  }
}
项目:hadoop-TCP    文件:Balancer.java   
private static void checkReplicationPolicyCompatibility(Configuration conf
    ) throws UnsupportedActionException {
  if (!(BlockPlacementPolicy.getInstance(conf, null, null) instanceof 
      BlockPlacementPolicyDefault)) {
    throw new UnsupportedActionException(
        "Balancer without BlockPlacementPolicyDefault");
  }
}
项目:hardfs    文件:Balancer.java   
private static void checkReplicationPolicyCompatibility(Configuration conf
    ) throws UnsupportedActionException {
  if (!(BlockPlacementPolicy.getInstance(conf, null, null) instanceof 
      BlockPlacementPolicyDefault)) {
    throw new UnsupportedActionException(
        "Balancer without BlockPlacementPolicyDefault");
  }
}
项目:hadoop-on-lustre2    文件:Balancer.java   
private static void checkReplicationPolicyCompatibility(Configuration conf
    ) throws UnsupportedActionException {
  if (!(BlockPlacementPolicy.getInstance(conf, null, null) instanceof 
      BlockPlacementPolicyDefault)) {
    throw new UnsupportedActionException(
        "Balancer without BlockPlacementPolicyDefault");
  }
}
项目:SOAPgaea    文件:Tracker.java   
public void unregister(BaseCounter o) throws UnsupportedActionException {
    throw new UnsupportedActionException("function isn't supported");
}
项目:SOAPgaea    文件:Tracker.java   
public void unregister(BaseCounter o) throws UnsupportedActionException {
    throw new UnsupportedActionException("function is not supported");
}
项目:cumulus    文件:Balancer.java   
private void checkReplicationPolicyCompatibility(Configuration conf) throws UnsupportedActionException {
  if (BlockPlacementPolicy.getInstance(conf, null, null).getClass() != 
      BlockPlacementPolicyDefault.class) {
    throw new UnsupportedActionException("Balancer without BlockPlacementPolicyDefault");
  }
}
项目:cumulus    文件:Balancer.java   
/** Default constructor */
Balancer() throws UnsupportedActionException {
}
项目:cumulus    文件:Balancer.java   
/** Construct a balancer from the given configuration */
Balancer(Configuration conf) throws UnsupportedActionException {
  checkReplicationPolicyCompatibility(conf);
  setConf(conf);
}
项目:cumulus    文件:Balancer.java   
/** Construct a balancer from the given configuration and threshold */
Balancer(Configuration conf, double threshold) throws UnsupportedActionException {
  checkReplicationPolicyCompatibility(conf);
  setConf(conf);
  this.threshold = threshold;
}