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


Java InterfaceAudience.Private方法代码示例

本文整理汇总了Java中org.apache.hadoop.hbase.classification.InterfaceAudience.Private方法的典型用法代码示例。如果您正苦于以下问题:Java InterfaceAudience.Private方法的具体用法?Java InterfaceAudience.Private怎么用?Java InterfaceAudience.Private使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.hadoop.hbase.classification.InterfaceAudience的用法示例。


在下文中一共展示了InterfaceAudience.Private方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: Context

import org.apache.hadoop.hbase.classification.InterfaceAudience; //导入方法依赖的package包/类
@InterfaceAudience.Private
public Context(
    final Configuration conf,
    final FileSystem fs,
    final ReplicationPeerConfig peerConfig,
    final String peerId,
    final UUID clusterId,
    final ReplicationPeer replicationPeer,
    final MetricsSource metrics,
    final TableDescriptors tableDescriptors) {
  this.peerConfig = peerConfig;
  this.conf = conf;
  this.fs = fs;
  this.clusterId = clusterId;
  this.peerId = peerId;
  this.replicationPeer = replicationPeer;
  this.metrics = metrics;
  this.tableDescriptors = tableDescriptors;
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:20,代码来源:ReplicationEndpoint.java

示例2: convert

import org.apache.hadoop.hbase.classification.InterfaceAudience; //导入方法依赖的package包/类
/**
 * Helper to convert the protobuf object.
 * @return Convert the current Protocol Buffers Procedure to {@link ProcedureInfo}
 * instance.
 */
@InterfaceAudience.Private
public static ProcedureInfo convert(final ProcedureProtos.Procedure procProto) {
  NonceKey nonceKey = null;
  if (procProto.getNonce() != HConstants.NO_NONCE) {
    nonceKey = new NonceKey(procProto.getNonceGroup(), procProto.getNonce());
  }

  return new ProcedureInfo(
    procProto.getProcId(),
    procProto.getClassName(),
    procProto.getOwner(),
    procProto.getState(),
    procProto.hasParentId() ? procProto.getParentId() : -1,
    nonceKey,
    procProto.hasException() ? procProto.getException() : null,
    procProto.getLastUpdate(),
    procProto.getStartTime(),
    procProto.hasResult() ? procProto.getResult().toByteArray() : null);
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:25,代码来源:ProcedureInfo.java

示例3: Context

import org.apache.hadoop.hbase.classification.InterfaceAudience; //导入方法依赖的package包/类
@InterfaceAudience.Private
public Context(
    final Configuration conf,
    final FileSystem fs,
    final ReplicationPeerConfig peerConfig,
    final String peerId,
    final UUID clusterId,
    final ReplicationPeer replicationPeer,
    final MetricsSource metrics) {
  this.peerConfig = peerConfig;
  this.conf = conf;
  this.fs = fs;
  this.clusterId = clusterId;
  this.peerId = peerId;
  this.replicationPeer = replicationPeer;
  this.metrics = metrics;
}
 
开发者ID:grokcoder,项目名称:pbase,代码行数:18,代码来源:ReplicationEndpoint.java

示例4: createDefaultChannelConnector

import org.apache.hadoop.hbase.classification.InterfaceAudience; //导入方法依赖的package包/类
@InterfaceAudience.Private
public static Connector createDefaultChannelConnector() {
  SelectChannelConnector ret = new SelectChannelConnector();
  ret.setLowResourceMaxIdleTime(10000);
  ret.setAcceptQueueSize(128);
  ret.setResolveNames(false);
  ret.setUseDirectBuffers(false);
  if(Shell.WINDOWS) {
    // result of setting the SO_REUSEADDR flag is different on Windows
    // http://msdn.microsoft.com/en-us/library/ms740621(v=vs.85).aspx
    // without this 2 NN's can start on the same machine and listen on
    // the same port with indeterminate routing of incoming requests to them
    ret.setReuseAddress(false);
  }
  ret.setHeaderBufferSize(1024*64);
  return ret;
}
 
开发者ID:grokcoder,项目名称:pbase,代码行数:18,代码来源:HttpServer.java

示例5: getDefaultExecutor

import org.apache.hadoop.hbase.classification.InterfaceAudience; //导入方法依赖的package包/类
@InterfaceAudience.Private
public static ThreadPoolExecutor getDefaultExecutor(Configuration conf) {
  int maxThreads = conf.getInt("hbase.htable.threads.max", Integer.MAX_VALUE);
  if (maxThreads == 0) {
    maxThreads = 1; // is there a better default?
  }
  long keepAliveTime = conf.getLong("hbase.htable.threads.keepalivetime", 60);

  // Using the "direct handoff" approach, new threads will only be created
  // if it is necessary and will grow unbounded. This could be bad but in HCM
  // we only create as many Runnables as there are region servers. It means
  // it also scales when new region servers are added.
  ThreadPoolExecutor pool = new ThreadPoolExecutor(1, maxThreads, keepAliveTime, TimeUnit.SECONDS,
      new SynchronousQueue<Runnable>(), Threads.newDaemonThreadFactory("htable"));
  pool.allowCoreThreadTimeOut(true);
  return pool;
}
 
开发者ID:grokcoder,项目名称:pbase,代码行数:18,代码来源:HTable.java

示例6: callMethod

import org.apache.hadoop.hbase.classification.InterfaceAudience; //导入方法依赖的package包/类
@Override
@InterfaceAudience.Private
public void callMethod(Descriptors.MethodDescriptor method,
                       RpcController controller,
                       Message request, Message responsePrototype,
                       RpcCallback<Message> callback) {
  Message response = null;
  try {
    response = callExecService(method, request, responsePrototype);
  } catch (IOException ioe) {
    LOG.warn("Call failed on IOException", ioe);
    ResponseConverter.setControllerException(controller, ioe);
  }
  if (callback != null) {
    callback.run(response);
  }
}
 
开发者ID:grokcoder,项目名称:pbase,代码行数:18,代码来源:CoprocessorRpcChannel.java

示例7: createCell

import org.apache.hadoop.hbase.classification.InterfaceAudience; //导入方法依赖的package包/类
/**
 * Marked as audience Private as of 1.2.0.
 * Creating a Cell with tags and a memstoreTS/mvcc is an internal implementation detail not for
 * public use.
 */
@InterfaceAudience.Private
public static Cell createCell(final byte[] row, final byte[] family, final byte[] qualifier,
    final long timestamp, final byte type, final byte[] value, byte[] tags, final long memstoreTS) {
  KeyValue keyValue = new KeyValue(row, family, qualifier, timestamp,
      KeyValue.Type.codeToType(type), value, tags);
  keyValue.setSequenceId(memstoreTS);
  return keyValue;
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:14,代码来源:CellUtil.java

示例8: legacyWarning

import org.apache.hadoop.hbase.classification.InterfaceAudience; //导入方法依赖的package包/类
/**
 * limits the amount of logging to once per coprocessor class.
 * Used in concert with {@link #useLegacyMethod(Class, String, Class[])} when a runtime issue
 * prevents properly supporting the legacy version of a coprocessor API.
 * Since coprocessors can be in tight loops this serves to limit the amount of log spam we create.
 */
@InterfaceAudience.Private
protected void legacyWarning(final Class<? extends Coprocessor> clazz, final String message) {
  if(legacyWarning.add(clazz)) {
    LOG.error("You have a legacy coprocessor loaded and there are events we can't map to the " +
        " deprecated API. Your coprocessor will not see these events.  Please update '" + clazz +
        "'. Details of the problem: " + message);
  }
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:15,代码来源:CoprocessorHost.java

示例9: setSequenceId

import org.apache.hadoop.hbase.classification.InterfaceAudience; //导入方法依赖的package包/类
/**
 * Sets the given seqId to the cell.
 * Marked as audience Private as of 1.2.0.
 * Setting a Cell sequenceid is an internal implementation detail not for general public use.
 * @param cell
 * @param seqId
 * @throws IOException when the passed cell is not of type {@link SettableSequenceId}
 */
@InterfaceAudience.Private
public static void setSequenceId(Cell cell, long seqId) throws IOException {
  if (cell instanceof SettableSequenceId) {
    ((SettableSequenceId) cell).setSequenceId(seqId);
  } else {
    throw new IOException(new UnsupportedOperationException("Cell is not of type "
        + SettableSequenceId.class.getName()));
  }
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:18,代码来源:CellUtil.java

示例10: getScannerCallable

import org.apache.hadoop.hbase.classification.InterfaceAudience; //导入方法依赖的package包/类
@InterfaceAudience.Private
protected ScannerCallableWithReplicas getScannerCallable(byte [] localStartKey,
    int nbRows) {
  scan.setStartRow(localStartKey);
  ScannerCallable s =
      new ScannerCallable(getConnection(), getTable(), scan, this.scanMetrics,
          this.rpcControllerFactory);
  s.setCaching(nbRows);
  ScannerCallableWithReplicas sr = new ScannerCallableWithReplicas(tableName, getConnection(),
   s, pool, primaryOperationTimeout, scan,
   retries, scannerTimeout, caching, conf, caller);
  return sr;
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:14,代码来源:ClientScanner.java

示例11: callBlockingMethod

import org.apache.hadoop.hbase.classification.InterfaceAudience; //导入方法依赖的package包/类
@Override
@InterfaceAudience.Private
public Message callBlockingMethod(Descriptors.MethodDescriptor method,
                                  RpcController controller,
                                  Message request, Message responsePrototype)
    throws ServiceException {
  try {
    return callExecService(controller, method, request, responsePrototype);
  } catch (IOException ioe) {
    throw new ServiceException("Error calling method "+method.getFullName(), ioe);
  }
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:13,代码来源:CoprocessorRpcChannel.java

示例12: init

import org.apache.hadoop.hbase.classification.InterfaceAudience; //导入方法依赖的package包/类
@InterfaceAudience.Private
protected void init(final byte [] encodedRegionName, final TableName tablename,
    long logSeqNum, final long now, List<UUID> clusterIds, long nonceGroup, long nonce) {
  this.logSeqNum = logSeqNum;
  this.writeTime = now;
  this.clusterIds = clusterIds;
  this.encodedRegionName = encodedRegionName;
  this.tablename = tablename;
  this.nonceGroup = nonceGroup;
  this.nonce = nonce;
}
 
开发者ID:grokcoder,项目名称:pbase,代码行数:12,代码来源:WALKey.java

示例13: HTableDescriptor

import org.apache.hadoop.hbase.classification.InterfaceAudience; //导入方法依赖的package包/类
/**
 * <em> INTERNAL </em> Private constructor used internally creating table descriptors for
 * catalog tables, <code>hbase:meta</code> and <code>-ROOT-</code>.
 */
@InterfaceAudience.Private
protected HTableDescriptor(final TableName name, HColumnDescriptor[] families) {
  setName(name);
  for(HColumnDescriptor descriptor : families) {
    this.families.put(descriptor.getName(), descriptor);
  }
}
 
开发者ID:grokcoder,项目名称:pbase,代码行数:12,代码来源:HTableDescriptor.java

示例14: RetriesExhaustedException

import org.apache.hadoop.hbase.classification.InterfaceAudience; //导入方法依赖的package包/类
/**
 * Create a new RetriesExhaustedException from the list of prior failures.
 * @param numTries
 * @param exceptions List of exceptions that failed before giving up
 */
@InterfaceAudience.Private
public RetriesExhaustedException(final int numTries,
                                 final List<ThrowableWithExtraContext> exceptions) {
  super(getMessage(numTries, exceptions),
      (exceptions != null && !exceptions.isEmpty() ?
          exceptions.get(exceptions.size() - 1).t : null));
}
 
开发者ID:grokcoder,项目名称:pbase,代码行数:13,代码来源:RetriesExhaustedException.java

示例15: HTable

import org.apache.hadoop.hbase.classification.InterfaceAudience; //导入方法依赖的package包/类
/**
 * Creates an object to access a HBase table.
 * Used by HBase internally.  DO NOT USE. See {@link ConnectionFactory} class comment for how to
 * get a {@link Table} instance (use {@link Table} instead of {@link HTable}).
 * @param tableName Name of the table.
 * @param connection HConnection to be used.
 * @param pool ExecutorService to be used.
 * @throws IOException if a remote or network exception occurs
 */
@InterfaceAudience.Private
public HTable(TableName tableName, final ClusterConnection connection,
    final TableConfiguration tableConfig,
    final RpcRetryingCallerFactory rpcCallerFactory,
    final RpcControllerFactory rpcControllerFactory,
    final ExecutorService pool) throws IOException {
  if (connection == null || connection.isClosed()) {
    throw new IllegalArgumentException("Connection is null or closed.");
  }
  this.tableName = tableName;
  this.cleanupConnectionOnClose = false;
  this.connection = connection;
  this.configuration = connection.getConfiguration();
  this.tableConfiguration = tableConfig;
  this.pool = pool;
  if (pool == null) {
    this.pool = getDefaultExecutor(this.configuration);
    this.cleanupPoolOnClose = true;
  } else {
    this.cleanupPoolOnClose = false;
  }

  this.rpcCallerFactory = rpcCallerFactory;
  this.rpcControllerFactory = rpcControllerFactory;

  this.finishSetup();
}
 
开发者ID:grokcoder,项目名称:pbase,代码行数:37,代码来源:HTable.java


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