Java IllegalArgument类代码示例

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


Java IllegalArgument类代码示例

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

示例1: colDescFromThrift

import org.apache.hadoop.hbase.thrift.generated.IllegalArgument; //导入依赖的package包/类
/**
 * This utility method creates a new Hbase HColumnDescriptor object based on a
 * Thrift ColumnDescriptor "struct".
 *
 * @param in
 *          Thrift ColumnDescriptor object
 * @return HColumnDescriptor
 * @throws IllegalArgument
 */
static public HColumnDescriptor colDescFromThrift(ColumnDescriptor in)
    throws IllegalArgument {
  Compression.Algorithm comp =
    Compression.getCompressionAlgorithmByName(in.compression.toLowerCase());
  BloomType bt =
    BloomType.valueOf(in.bloomFilterType);

  if (in.name == null || !in.name.hasRemaining()) {
    throw new IllegalArgument("column name is empty");
  }
  byte [] parsedName = KeyValue.parseColumn(Bytes.getBytes(in.name))[0];
  HColumnDescriptor col = new HColumnDescriptor(parsedName)
      .setMaxVersions(in.maxVersions)
      .setCompressionType(comp)
      .setInMemory(in.inMemory)
      .setBlockCacheEnabled(in.blockCacheEnabled)
      .setTimeToLive(in.timeToLive > 0 ? in.timeToLive : Integer.MAX_VALUE)
      .setBloomFilterType(bt);
  return col;
} 
开发者ID:fengchen8086,项目名称:ditb,代码行数:30,代码来源:ThriftUtilities.java

示例2: scannerGetList

import org.apache.hadoop.hbase.thrift.generated.IllegalArgument; //导入依赖的package包/类
@Override
public List<TRowResult> scannerGetList(int id,int nbRows)
    throws IllegalArgument, IOError {
  LOG.debug("scannerGetList: id=" + id);
  ResultScannerWrapper resultScannerWrapper = getScanner(id);
  if (null == resultScannerWrapper) {
    String message = "scanner ID is invalid";
    LOG.warn(message);
    throw new IllegalArgument("scanner ID is invalid");
  }

  Result [] results = null;
  try {
    results = resultScannerWrapper.getScanner().next(nbRows);
    if (null == results) {
      return new ArrayList<TRowResult>();
    }
  } catch (IOException e) {
    LOG.warn(e.getMessage(), e);
    throw new IOError(Throwables.getStackTraceAsString(e));
  }
  return ThriftUtilities.rowResultFromHBase(results, resultScannerWrapper.isColumnSorted());
} 
开发者ID:fengchen8086,项目名称:ditb,代码行数:24,代码来源:ThriftServerRunner.java

示例3: colDescFromThrift

import org.apache.hadoop.hbase.thrift.generated.IllegalArgument; //导入依赖的package包/类
/**
 * This utility method creates a new Hbase HColumnDescriptor object based on a
 * Thrift ColumnDescriptor "struct".
 *
 * @param in
 *          Thrift ColumnDescriptor object
 * @return HColumnDescriptor
 * @throws IllegalArgument
 */
static public HColumnDescriptor colDescFromThrift(ColumnDescriptor in)
    throws IllegalArgument {
  Compression.Algorithm comp =
    Compression.getCompressionAlgorithmByName(in.compression.toLowerCase());
  StoreFile.BloomType bt =
    BloomType.valueOf(in.bloomFilterType);

  if (in.name == null || !in.name.hasRemaining()) {
    throw new IllegalArgument("column name is empty");
  }
  byte [] parsedName = KeyValue.parseColumn(Bytes.getBytes(in.name))[0];
  HColumnDescriptor col = new HColumnDescriptor(parsedName)
      .setMaxVersions(in.maxVersions)
      .setCompressionType(comp)
      .setInMemory(in.inMemory)
      .setBlockCacheEnabled(in.blockCacheEnabled)
      .setTimeToLive(in.timeToLive)
      .setBloomFilterType(bt);
  return col;
} 
开发者ID:fengchen8086,项目名称:LCIndex-HBase-0.94.16,代码行数:30,代码来源:ThriftUtilities.java

示例4: scannerGetList

import org.apache.hadoop.hbase.thrift.generated.IllegalArgument; //导入依赖的package包/类
@Override
public List<TRowResult> scannerGetList(int id,int nbRows)
    throws IllegalArgument, IOError {
  LOG.debug("scannerGetList: id=" + id);
  ResultScannerWrapper resultScannerWrapper = getScanner(id);
  if (null == resultScannerWrapper) {
    String message = "scanner ID is invalid";
    LOG.warn(message);
    throw new IllegalArgument("scanner ID is invalid");
  }

  Result [] results = null;
  try {
    results = resultScannerWrapper.getScanner().next(nbRows);
    if (null == results) {
      return new ArrayList<TRowResult>();
    }
  } catch (IOException e) {
    LOG.warn(e.getMessage(), e);
    throw new IOError(e.getMessage());
  }
  return ThriftUtilities.rowResultFromHBase(results, resultScannerWrapper.isColumnSorted());
} 
开发者ID:fengchen8086,项目名称:LCIndex-HBase-0.94.16,代码行数:24,代码来源:ThriftServerRunner.java

示例5: colDescFromThrift

import org.apache.hadoop.hbase.thrift.generated.IllegalArgument; //导入依赖的package包/类
/**
 * This utility method creates a new Hbase HColumnDescriptor object based on a
 * Thrift ColumnDescriptor "struct".
 *
 * @param in
 *          Thrift ColumnDescriptor object
 * @return HColumnDescriptor
 * @throws IllegalArgument
 */
static public HColumnDescriptor colDescFromThrift(ColumnDescriptor in)
    throws IllegalArgument {
  Compression.Algorithm comp =
    Compression.getCompressionAlgorithmByName(in.compression.toLowerCase());
  BloomType bt =
    BloomType.valueOf(in.bloomFilterType);

  if (in.name == null || !in.name.hasRemaining()) {
    throw new IllegalArgument("column name is empty");
  }
  byte [] parsedName = KeyValue.parseColumn(Bytes.getBytes(in.name))[0];
  HColumnDescriptor col = new HColumnDescriptor(parsedName)
      .setMaxVersions(in.maxVersions)
      .setCompressionType(comp)
      .setInMemory(in.inMemory)
      .setBlockCacheEnabled(in.blockCacheEnabled)
      .setTimeToLive(in.timeToLive)
      .setBloomFilterType(bt);
  return col;
} 
开发者ID:tenggyut,项目名称:HIndex,代码行数:30,代码来源:ThriftUtilities.java

示例6: colDescFromThrift

import org.apache.hadoop.hbase.thrift.generated.IllegalArgument; //导入依赖的package包/类
/**
 * This utility method creates a new Hbase HColumnDescriptor object based on a
 * Thrift ColumnDescriptor "struct".
 *
 * @param in Thrift ColumnDescriptor object
 * @return HColumnDescriptor
 * @throws IllegalArgument if the column name is empty
 */
static public HColumnDescriptor colDescFromThrift(ColumnDescriptor in)
    throws IllegalArgument {
  Compression.Algorithm comp =
    Compression.getCompressionAlgorithmByName(in.compression.toLowerCase(Locale.ROOT));
  BloomType bt =
    BloomType.valueOf(in.bloomFilterType);

  if (in.name == null || !in.name.hasRemaining()) {
    throw new IllegalArgument("column name is empty");
  }
  byte [] parsedName = CellUtil.parseColumn(Bytes.getBytes(in.name))[0];
  HColumnDescriptor col = new HColumnDescriptor(parsedName)
      .setMaxVersions(in.maxVersions)
      .setCompressionType(comp)
      .setInMemory(in.inMemory)
      .setBlockCacheEnabled(in.blockCacheEnabled)
      .setTimeToLive(in.timeToLive > 0 ? in.timeToLive : Integer.MAX_VALUE)
      .setBloomFilterType(bt);
  return col;
} 
开发者ID:apache,项目名称:hbase,代码行数:29,代码来源:ThriftUtilities.java

示例7: scannerGetList

import org.apache.hadoop.hbase.thrift.generated.IllegalArgument; //导入依赖的package包/类
@Override
public List<TRowResult> scannerGetList(int id,int nbRows)
    throws IllegalArgument, IOError {
  LOG.debug("scannerGetList: id=" + id);
  ResultScannerWrapper resultScannerWrapper = getScanner(id);
  if (null == resultScannerWrapper) {
    String message = "scanner ID is invalid";
    LOG.warn(message);
    throw new IllegalArgument("scanner ID is invalid");
  }

  Result [] results = null;
  try {
    results = resultScannerWrapper.getScanner().next(nbRows);
    if (null == results) {
      return new ArrayList<>();
    }
  } catch (IOException e) {
    LOG.warn(e.getMessage(), e);
    throw getIOError(e);
  }
  return ThriftUtilities.rowResultFromHBase(results, resultScannerWrapper.isColumnSorted());
} 
开发者ID:apache,项目名称:hbase,代码行数:24,代码来源:ThriftServerRunner.java

示例8: scannerGetList

import org.apache.hadoop.hbase.thrift.generated.IllegalArgument; //导入依赖的package包/类
@Override
public List<TRowResult> scannerGetList(int id,int nbRows) throws IllegalArgument, IOError {
    LOG.debug("scannerGetList: id=" + id);
    ResultScanner scanner = getScanner(id);
    if (null == scanner) {
        throw new IllegalArgument("scanner ID is invalid");
    }

    Result [] results = null;
    try {
        results = scanner.next(nbRows);
        if (null == results) {
            return new ArrayList<TRowResult>();
        }
    } catch (IOException e) {
        throw new IOError(e.getMessage());
    }
    return ThriftUtilities.rowResultFromHBase(results);
} 
开发者ID:lifeng5042,项目名称:RStore,代码行数:20,代码来源:ThriftServer.java

示例9: colDescFromThrift

import org.apache.hadoop.hbase.thrift.generated.IllegalArgument; //导入依赖的package包/类
/**
 * This utility method creates a new Hbase HColumnDescriptor object based on a
 * Thrift ColumnDescriptor "struct".
 *
 * @param in
 *          Thrift ColumnDescriptor object
 * @return HColumnDescriptor
 * @throws IllegalArgument
 */
static public HColumnDescriptor colDescFromThrift(ColumnDescriptor in)
    throws IllegalArgument {
  Compression.Algorithm comp =
    Compression.getCompressionAlgorithmByName(in.compression.toLowerCase());
  StoreFile.BloomType bt =
    BloomType.valueOf(in.bloomFilterType);

  if (in.name == null || !in.name.hasRemaining()) {
    throw new IllegalArgument("column name is empty");
  }
  byte [] parsedName = KeyValue.parseColumn(Bytes.getBytes(in.name))[0];
  HColumnDescriptor col = new HColumnDescriptor(parsedName,
      in.maxVersions, comp.getName(), in.inMemory, in.blockCacheEnabled,
      in.timeToLive, bt.toString());
  return col;
} 
开发者ID:lifeng5042,项目名称:RStore,代码行数:26,代码来源:ThriftUtilities.java

示例10: scannerGetList

import org.apache.hadoop.hbase.thrift.generated.IllegalArgument; //导入依赖的package包/类
@Override
public List<TRowResult> scannerGetList(int id,int nbRows)
    throws IllegalArgument, IOError {
  LOG.debug("scannerGetList: id=" + id);
  ResultScanner scanner = getScanner(id);
  if (null == scanner) {
    String message = "scanner ID is invalid";
    LOG.warn(message);
    throw new IllegalArgument("scanner ID is invalid");
  }

  Result [] results = null;
  try {
    results = scanner.next(nbRows);
    if (null == results) {
      return new ArrayList<TRowResult>();
    }
  } catch (IOException e) {
    LOG.warn(e.getMessage(), e);
    throw new IOError(e.getMessage());
  }
  return ThriftUtilities.rowResultFromHBase(results);
} 
开发者ID:zwqjsj0404,项目名称:HBase-Research,代码行数:24,代码来源:ThriftServerRunner.java

示例11: mutateRow

import org.apache.hadoop.hbase.thrift.generated.IllegalArgument; //导入依赖的package包/类
@Override
public void mutateRow(ByteBuffer tableName, ByteBuffer row,
    List<Mutation> mutations, Map<ByteBuffer, ByteBuffer> attributes)
    throws IOError, IllegalArgument {
  mutateRowTs(tableName, row, mutations, HConstants.LATEST_TIMESTAMP,
              attributes);
} 
开发者ID:fengchen8086,项目名称:ditb,代码行数:8,代码来源:ThriftServerRunner.java

示例12: atomicIncrement

import org.apache.hadoop.hbase.thrift.generated.IllegalArgument; //导入依赖的package包/类
@Override
public long atomicIncrement(
    ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long amount)
        throws IOError, IllegalArgument, TException {
  byte [][] famAndQf = KeyValue.parseColumn(getBytes(column));
  if(famAndQf.length == 1) {
    return atomicIncrement(tableName, row, famAndQf[0], HConstants.EMPTY_BYTE_ARRAY, amount);
  }
  return atomicIncrement(tableName, row, famAndQf[0], famAndQf[1], amount);
} 
开发者ID:fengchen8086,项目名称:ditb,代码行数:11,代码来源:ThriftServerRunner.java

示例13: scannerClose

import org.apache.hadoop.hbase.thrift.generated.IllegalArgument; //导入依赖的package包/类
@Override
public void scannerClose(int id) throws IOError, IllegalArgument {
  LOG.debug("scannerClose: id=" + id);
  ResultScannerWrapper resultScannerWrapper = getScanner(id);
  if (resultScannerWrapper == null) {
    String message = "scanner ID is invalid";
    LOG.warn(message);
    throw new IllegalArgument("scanner ID is invalid");
  }
  resultScannerWrapper.getScanner().close();
  removeScanner(id);
} 
开发者ID:fengchen8086,项目名称:ditb,代码行数:13,代码来源:ThriftServerRunner.java

示例14: atomicIncrement

import org.apache.hadoop.hbase.thrift.generated.IllegalArgument; //导入依赖的package包/类
@Deprecated
@Override
public long atomicIncrement(
    ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long amount)
        throws IOError, IllegalArgument, TException {
  byte [][] famAndQf = KeyValue.parseColumn(getBytes(column));
  if(famAndQf.length == 1) {
    return atomicIncrement(tableName, row, famAndQf[0], new byte[0],
        amount);
  }
  return atomicIncrement(tableName, row, famAndQf[0], famAndQf[1], amount);
} 
开发者ID:fengchen8086,项目名称:LCIndex-HBase-0.94.16,代码行数:13,代码来源:ThriftServerRunner.java

示例15: scannerClose

import org.apache.hadoop.hbase.thrift.generated.IllegalArgument; //导入依赖的package包/类
public void scannerClose(int id) throws IOError, IllegalArgument {
  LOG.debug("scannerClose: id=" + id);
  ResultScannerWrapper resultScannerWrapper = getScanner(id);
  if (resultScannerWrapper == null) {
    String message = "scanner ID is invalid";
    LOG.warn(message);
    throw new IllegalArgument("scanner ID is invalid");
  }
  resultScannerWrapper.getScanner().close();
  removeScanner(id);
} 
开发者ID:fengchen8086,项目名称:LCIndex-HBase-0.94.16,代码行数:12,代码来源:ThriftServerRunner.java

本文标签属性:

示例:示例志愿表

代码:代码大全可复制

java:javascript什么意思

IllegalArgument:illegalargumentexception

上一篇:俄罗斯失联月球探测器已坠毁了吗(印度登月成功,俄罗斯尴尬了,美国笑了?)
下一篇:Java UIComponent.getValueExpression方法代码示例(javauicomponent.getvalueexpression方法的典型用法代码示例)

为您推荐