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


Java IllegalArgumentIOException类代码示例

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


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

示例1: initiateCompactionStrategy

import org.apache.hadoop.hbase.exceptions.IllegalArgumentIOException; //导入依赖的package包/类
@VisibleForTesting
void initiateCompactionStrategy(MemoryCompactionPolicy compType,
    Configuration configuration, String cfName) throws IllegalArgumentIOException {

  assert (compType !=MemoryCompactionPolicy.NONE);

  switch (compType){
    case BASIC: strategy = new BasicMemStoreCompactionStrategy(configuration, cfName);
      break;
    case EAGER: strategy = new EagerMemStoreCompactionStrategy(configuration, cfName);
      break;
    case ADAPTIVE: strategy = new AdaptiveMemStoreCompactionStrategy(configuration, cfName);
      break;
    default:
      // sanity check
      throw new IllegalArgumentIOException("Unknown memory compaction type " + compType);
  }
}
 
开发者ID:apache,项目名称:hbase,代码行数:19,代码来源:MemStoreCompactor.java

示例2: assertIsIllegalArgumentException

import org.apache.hadoop.hbase.exceptions.IllegalArgumentIOException; //导入依赖的package包/类
public static void assertIsIllegalArgumentException(final ProcedureInfo result) {
  assertEquals(true, result.isFailed());
  LOG.info(result.getExceptionFullMessage());
  Throwable cause = ProcedureTestingUtility.getExceptionCause(result);
  assertTrue("expected IllegalArgumentIOException, got " + cause,
    cause instanceof IllegalArgumentIOException);
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:8,代码来源:ProcedureTestingUtility.java

示例3: updateMetaState

import org.apache.hadoop.hbase.exceptions.IllegalArgumentIOException; //导入依赖的package包/类
protected void updateMetaState(TableName tableName, TableState.State newState)
    throws IOException {
  if (tableName.equals(TableName.META_TABLE_NAME)) {
    if (TableState.State.DISABLING.equals(newState) ||
        TableState.State.DISABLED.equals(newState)) {
      throw new IllegalArgumentIOException("Cannot disable the meta table; " + newState);
    }
    // Otherwise, just return; no need to set ENABLED on meta -- it is always ENABLED.
    return;
  }
  MetaTableAccessor.updateTableState(master.getConnection(), tableName, newState);
}
 
开发者ID:apache,项目名称:hbase,代码行数:13,代码来源:TableStateManager.java

示例4: MemStoreCompactor

import org.apache.hadoop.hbase.exceptions.IllegalArgumentIOException; //导入依赖的package包/类
public MemStoreCompactor(CompactingMemStore compactingMemStore,
    MemoryCompactionPolicy compactionPolicy) throws IllegalArgumentIOException {
  this.compactingMemStore = compactingMemStore;
  this.compactionKVMax = compactingMemStore.getConfiguration()
      .getInt(HConstants.COMPACTION_KV_MAX, HConstants.COMPACTION_KV_MAX_DEFAULT);
  initiateCompactionStrategy(compactionPolicy, compactingMemStore.getConfiguration(),
      compactingMemStore.getFamilyName());
}
 
开发者ID:apache,项目名称:hbase,代码行数:9,代码来源:MemStoreCompactor.java

示例5: createMemStoreCompactor

import org.apache.hadoop.hbase.exceptions.IllegalArgumentIOException; //导入依赖的package包/类
@VisibleForTesting
protected MemStoreCompactor createMemStoreCompactor(MemoryCompactionPolicy compactionPolicy)
    throws IllegalArgumentIOException {
  return new MemStoreCompactor(this, compactionPolicy);
}
 
开发者ID:apache,项目名称:hbase,代码行数:6,代码来源:CompactingMemStore.java

示例6: MyMemStoreCompactor

import org.apache.hadoop.hbase.exceptions.IllegalArgumentIOException; //导入依赖的package包/类
public MyMemStoreCompactor(CompactingMemStore compactingMemStore, MemoryCompactionPolicy
    compactionPolicy) throws IllegalArgumentIOException {
  super(compactingMemStore, compactionPolicy);
}
 
开发者ID:apache,项目名称:hbase,代码行数:5,代码来源:TestHStore.java

示例7: createMemStoreCompactor

import org.apache.hadoop.hbase.exceptions.IllegalArgumentIOException; //导入依赖的package包/类
@Override
protected MemStoreCompactor createMemStoreCompactor(MemoryCompactionPolicy compactionPolicy)
    throws IllegalArgumentIOException {
  return new MyMemStoreCompactor(this, compactionPolicy);
}
 
开发者ID:apache,项目名称:hbase,代码行数:6,代码来源:TestHStore.java

示例8: initiateType

import org.apache.hadoop.hbase.exceptions.IllegalArgumentIOException; //导入依赖的package包/类
void initiateType(MemoryCompactionPolicy compactionType, Configuration conf)
    throws IllegalArgumentIOException {
  compactor.initiateCompactionStrategy(compactionType, conf, "CF_TEST");
}
 
开发者ID:apache,项目名称:hbase,代码行数:5,代码来源:TestCompactingMemStore.java

示例9: assertIsIllegalArgumentException

import org.apache.hadoop.hbase.exceptions.IllegalArgumentIOException; //导入依赖的package包/类
public static void assertIsIllegalArgumentException(final Procedure<?> result) {
  Throwable cause = assertProcFailed(result);
  assertTrue("expected IllegalArgumentIOException, got " + cause,
    cause instanceof IllegalArgumentIOException);
}
 
开发者ID:apache,项目名称:hbase,代码行数:6,代码来源:ProcedureTestingUtility.java

示例10: createNInputSplitsUniform

import org.apache.hadoop.hbase.exceptions.IllegalArgumentIOException; //导入依赖的package包/类
/**
 * Create n splits for one InputSplit, For now only support uniform distribution
 * @param split A TableSplit corresponding to a range of rowkeys
 * @param n     Number of ranges after splitting.  Pass 1 means no split for the range
 *              Pass 2 if you want to split the range in two;
 * @return A list of TableSplit, the size of the list is n
 * @throws IllegalArgumentIOException
 */
protected List<InputSplit> createNInputSplitsUniform(InputSplit split, int n)
    throws IllegalArgumentIOException {
  if (split == null || !(split instanceof TableSplit)) {
    throw new IllegalArgumentIOException(
        "InputSplit for CreateNSplitsPerRegion can not be null + "
            + "and should be instance of TableSplit");
  }
  //if n < 1, then still continue using n = 1
  n = n < 1 ? 1 : n;
  List<InputSplit> res = new ArrayList<>(n);
  if (n == 1) {
    res.add(split);
    return res;
  }

  // Collect Region related information
  TableSplit ts = (TableSplit) split;
  TableName tableName = ts.getTable();
  String regionLocation = ts.getRegionLocation();
  String encodedRegionName = ts.getEncodedRegionName();
  long regionSize = ts.getLength();
  byte[] startRow = ts.getStartRow();
  byte[] endRow = ts.getEndRow();

  // For special case: startRow or endRow is empty
  if (startRow.length == 0 && endRow.length == 0){
    startRow = new byte[1];
    endRow = new byte[1];
    startRow[0] = 0;
    endRow[0] = -1;
  }
  if (startRow.length == 0 && endRow.length != 0){
    startRow = new byte[1];
    startRow[0] = 0;
  }
  if (startRow.length != 0 && endRow.length == 0){
    endRow =new byte[startRow.length];
    for (int k = 0; k < startRow.length; k++){
      endRow[k] = -1;
    }
  }

  // Split Region into n chunks evenly
  byte[][] splitKeys = Bytes.split(startRow, endRow, true, n-1);
  for (int i = 0; i < splitKeys.length - 1; i++) {
    //notice that the regionSize parameter may be not very accurate
    TableSplit tsplit =
        new TableSplit(tableName, scan, splitKeys[i], splitKeys[i + 1], regionLocation,
            encodedRegionName, regionSize / n);
    res.add(tsplit);
  }
  return res;
}
 
开发者ID:apache,项目名称:hbase,代码行数:62,代码来源:TableInputFormatBase.java


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