当前位置: 首页>>代码示例>>Java>>正文


Java UnsupportedActionException类代码示例

本文整理汇总了Java中org.apache.hadoop.hdfs.server.namenode.UnsupportedActionException的典型用法代码示例。如果您正苦于以下问题:Java UnsupportedActionException类的具体用法?Java UnsupportedActionException怎么用?Java UnsupportedActionException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


UnsupportedActionException类属于org.apache.hadoop.hdfs.server.namenode包,在下文中一共展示了UnsupportedActionException类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: processOptions

import org.apache.hadoop.hdfs.server.namenode.UnsupportedActionException; //导入依赖的package包/类
@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());
}
 
开发者ID:aliyun-beta,项目名称:aliyun-oss-hadoop-fs,代码行数:27,代码来源:ECCommand.java

示例2: checkReplicationPolicyCompatibility

import org.apache.hadoop.hdfs.server.namenode.UnsupportedActionException; //导入依赖的package包/类
private static void checkReplicationPolicyCompatibility(Configuration conf
    ) throws UnsupportedActionException {
  if (!(BlockPlacementPolicy.getInstance(conf, null, null, null) instanceof 
      BlockPlacementPolicyDefault)) {
    throw new UnsupportedActionException(
        "Balancer without BlockPlacementPolicyDefault");
  }
}
 
开发者ID:naver,项目名称:hadoop,代码行数:9,代码来源:Balancer.java

示例3: checkReplicationPolicyCompatibility

import org.apache.hadoop.hdfs.server.namenode.UnsupportedActionException; //导入依赖的package包/类
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");
  }
}
 
开发者ID:aliyun-beta,项目名称:aliyun-oss-hadoop-fs,代码行数:11,代码来源:Balancer.java

示例4: processPath

import org.apache.hadoop.hdfs.server.namenode.UnsupportedActionException; //导入依赖的package包/类
@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");
  }
}
 
开发者ID:aliyun-beta,项目名称:aliyun-oss-hadoop-fs,代码行数:8,代码来源:ECCommand.java

示例5: checkReplicationPolicyCompatibility

import org.apache.hadoop.hdfs.server.namenode.UnsupportedActionException; //导入依赖的package包/类
private static void checkReplicationPolicyCompatibility(Configuration conf
    ) throws UnsupportedActionException {
  if (!(BlockPlacementPolicy.getInstance(conf, null, null) instanceof 
      BlockPlacementPolicyDefault)) {
    throw new UnsupportedActionException(
        "Balancer without BlockPlacementPolicyDefault");
  }
}
 
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:9,代码来源:Balancer.java

示例6: checkReplicationPolicyCompatibility

import org.apache.hadoop.hdfs.server.namenode.UnsupportedActionException; //导入依赖的package包/类
private static void checkReplicationPolicyCompatibility(Configuration conf)
    throws UnsupportedActionException {
  if (BlockPlacementPolicy.getInstance(conf, null, null).getClass() !=
      BlockPlacementPolicyDefault.class) {
    throw new UnsupportedActionException(
        "Balancer without BlockPlacementPolicyDefault");
  }
}
 
开发者ID:hopshadoop,项目名称:hops,代码行数:9,代码来源:Balancer.java

示例7: unregister

import org.apache.hadoop.hdfs.server.namenode.UnsupportedActionException; //导入依赖的package包/类
public void unregister(BaseCounter o) throws UnsupportedActionException {
	throw new UnsupportedActionException("function isn't supported");
}
 
开发者ID:BGI-flexlab,项目名称:SOAPgaea,代码行数:4,代码来源:Tracker.java

示例8: checkReplicationPolicyCompatibility

import org.apache.hadoop.hdfs.server.namenode.UnsupportedActionException; //导入依赖的package包/类
private void checkReplicationPolicyCompatibility(Configuration conf) throws UnsupportedActionException {
  if (BlockPlacementPolicy.getInstance(conf, null, null).getClass() != 
      BlockPlacementPolicyDefault.class) {
    throw new UnsupportedActionException("Balancer without BlockPlacementPolicyDefault");
  }
}
 
开发者ID:cumulusyebl,项目名称:cumulus,代码行数:7,代码来源:Balancer.java

示例9: Balancer

import org.apache.hadoop.hdfs.server.namenode.UnsupportedActionException; //导入依赖的package包/类
/** Default constructor */
Balancer() throws UnsupportedActionException {
}
 
开发者ID:cumulusyebl,项目名称:cumulus,代码行数:4,代码来源:Balancer.java


注:本文中的org.apache.hadoop.hdfs.server.namenode.UnsupportedActionException类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。