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


Java HBaseSaslRpcServer.init方法代码示例

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


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

示例1: SecureServer

import org.apache.hadoop.hbase.security.HBaseSaslRpcServer; //导入方法依赖的package包/类
/** Constructs a server listening on the named port and address.  Parameters passed must
 * be of the named class.  The <code>handlerCount</handlerCount> determines
 * the number of handler threads that will be used to process calls.
 *
 */
@SuppressWarnings("unchecked")
protected SecureServer(String bindAddress, int port,
                Class<? extends Writable> paramClass, int handlerCount,
                int priorityHandlerCount, Configuration conf, String serverName,
                int highPriorityLevel)
  throws IOException {
  super(bindAddress, port, paramClass, handlerCount, priorityHandlerCount,
      conf, serverName, highPriorityLevel);
  this.authorize =
    conf.getBoolean(HADOOP_SECURITY_AUTHORIZATION, false);
  this.userProvider = UserProvider.instantiate(this.conf);
  this.isSecurityEnabled = userProvider.isHBaseSecurityEnabled();

  if (isSecurityEnabled) {
    HBaseSaslRpcServer.init(conf);
  }
}
 
开发者ID:wanhao,项目名称:IRIndex,代码行数:23,代码来源:SecureServer.java

示例2: SecureServer

import org.apache.hadoop.hbase.security.HBaseSaslRpcServer; //导入方法依赖的package包/类
/** Constructs a server listening on the named port and address.  Parameters passed must
 * be of the named class.  The <code>handlerCount</handlerCount> determines
 * the number of handler threads that will be used to process calls.
 *
 */
@SuppressWarnings("unchecked")
protected SecureServer(String bindAddress, int port,
                Class<? extends Writable> paramClass, int handlerCount,
                int priorityHandlerCount, Configuration conf, String serverName,
                int highPriorityLevel)
  throws IOException {
  super(bindAddress, port, paramClass, handlerCount, priorityHandlerCount,
      conf, serverName, highPriorityLevel);
  this.authorize =
    conf.getBoolean(HADOOP_SECURITY_AUTHORIZATION, false);
  this.isSecurityEnabled = User.isHBaseSecurityEnabled(this.conf);

  if (isSecurityEnabled) {
    HBaseSaslRpcServer.init(conf);
  }
}
 
开发者ID:zwqjsj0404,项目名称:HBase-Research,代码行数:22,代码来源:SecureServer.java

示例3: setConf

import org.apache.hadoop.hbase.security.HBaseSaslRpcServer; //导入方法依赖的package包/类
@Override
public void setConf(Configuration config) {
  this.conf = config;
  this.provider = UserProvider.instantiate(config);
  if (provider.isHBaseSecurityEnabled()) {
    HBaseSaslRpcServer.init(conf);
  }
  // check for an already created client
  if (this.client != null) {
    this.client.stop();
  }
  this.client = new SecureClient(HbaseObjectWritable.class, conf, provider);
}
 
开发者ID:wanhao,项目名称:IRIndex,代码行数:14,代码来源:SecureRpcEngine.java

示例4: setConf

import org.apache.hadoop.hbase.security.HBaseSaslRpcServer; //导入方法依赖的package包/类
@Override
public void setConf(Configuration config) {
  this.conf = config;
  if (User.isHBaseSecurityEnabled(conf)) {
    HBaseSaslRpcServer.init(conf);
  }
  // check for an already created client
  if (this.client != null) {
    this.client.stop();
  }
  this.client = new SecureClient(HbaseObjectWritable.class, conf);
}
 
开发者ID:zwqjsj0404,项目名称:HBase-Research,代码行数:13,代码来源:SecureRpcEngine.java

示例5: RpcServer

import org.apache.hadoop.hbase.security.HBaseSaslRpcServer; //导入方法依赖的package包/类
/**
 * Constructs a server listening on the named port and address.
 * @param server hosting instance of {@link Server}. We will do authentications if an
 * instance else pass null for no authentication check.
 * @param name Used keying this rpc servers' metrics and for naming the Listener thread.
 * @param services A list of services.
 * @param bindAddress Where to listen
 * @param conf
 * @param scheduler
 */
public RpcServer(final Server server, final String name,
    final List<BlockingServiceAndInterface> services,
    final InetSocketAddress bindAddress, Configuration conf,
    RpcScheduler scheduler)
    throws IOException {

  if (conf.getBoolean("hbase.ipc.server.reservoir.enabled", true)) {
    this.reservoir = new BoundedByteBufferPool(
        conf.getInt("hbase.ipc.server.reservoir.max.buffer.size", 1024 * 1024),
        conf.getInt("hbase.ipc.server.reservoir.initial.buffer.size", 16 * 1024),
        // Make the max twice the number of handlers to be safe.
        conf.getInt("hbase.ipc.server.reservoir.initial.max",
            conf.getInt(HConstants.REGION_SERVER_HANDLER_COUNT,
                HConstants.DEFAULT_REGION_SERVER_HANDLER_COUNT) * 2));
  } else {
    reservoir = null;
  }
  
  this.server = server;
  this.services = services;
  this.bindAddress = bindAddress;
  this.conf = conf;
  this.socketSendBufferSize = 0;
  this.maxQueueSize =
    this.conf.getInt("hbase.ipc.server.max.callqueue.size", DEFAULT_MAX_CALLQUEUE_SIZE);
  this.readThreads = conf.getInt("hbase.ipc.server.read.threadpool.size", 10);
  this.maxIdleTime = 2 * conf.getInt("hbase.ipc.client.connection.maxidletime", 1000);
  this.maxConnectionsToNuke = conf.getInt("hbase.ipc.client.kill.max", 10);
  this.thresholdIdleConnections = conf.getInt("hbase.ipc.client.idlethreshold", 4000);
  this.purgeTimeout = conf.getLong("hbase.ipc.client.call.purge.timeout",
    2 * HConstants.DEFAULT_HBASE_RPC_TIMEOUT);
  this.warnResponseTime = conf.getInt(WARN_RESPONSE_TIME, DEFAULT_WARN_RESPONSE_TIME);
  this.warnResponseSize = conf.getInt(WARN_RESPONSE_SIZE, DEFAULT_WARN_RESPONSE_SIZE);

  // Start the listener here and let it bind to the port
  listener = new Listener(name);
  this.port = listener.getAddress().getPort();

  this.metrics = new MetricsHBaseServer(name, new MetricsHBaseServerWrapperImpl(this));
  this.tcpNoDelay = conf.getBoolean("hbase.ipc.server.tcpnodelay", true);
  this.tcpKeepAlive = conf.getBoolean("hbase.ipc.server.tcpkeepalive", true);

  this.ipcUtil = new IPCUtil(conf);


  // Create the responder here
  responder = new Responder();
  this.authorize = conf.getBoolean(HADOOP_SECURITY_AUTHORIZATION, false);
  this.userProvider = UserProvider.instantiate(conf);
  this.isSecurityEnabled = userProvider.isHBaseSecurityEnabled();
  if (isSecurityEnabled) {
    HBaseSaslRpcServer.init(conf);
  }
  initReconfigurable(conf);

  this.scheduler = scheduler;
  this.scheduler.init(new RpcSchedulerContext(this));
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:69,代码来源:RpcServer.java

示例6: RpcServer

import org.apache.hadoop.hbase.security.HBaseSaslRpcServer; //导入方法依赖的package包/类
/**
 * Constructs a server listening on the named port and address.
 * @param server hosting instance of {@link Server}. We will do authentications if an
 * instance else pass null for no authentication check.
 * @param name Used keying this rpc servers' metrics and for naming the Listener thread.
 * @param services A list of services.
 * @param bindAddress Where to listen
 * @param conf
 * @param scheduler
 */
public RpcServer(final Server server, final String name,
    final List<BlockingServiceAndInterface> services,
    final InetSocketAddress bindAddress, Configuration conf,
    RpcScheduler scheduler)
    throws IOException {

  this.server = server;
  this.services = services;
  this.bindAddress = bindAddress;
  this.conf = conf;
  this.socketSendBufferSize = 0;
  this.maxQueueSize =
    this.conf.getInt("hbase.ipc.server.max.callqueue.size", DEFAULT_MAX_CALLQUEUE_SIZE);
  this.readThreads = conf.getInt("hbase.ipc.server.read.threadpool.size", 10);
  this.maxIdleTime = 2 * conf.getInt("hbase.ipc.client.connection.maxidletime", 1000);
  this.maxConnectionsToNuke = conf.getInt("hbase.ipc.client.kill.max", 10);
  this.thresholdIdleConnections = conf.getInt("hbase.ipc.client.idlethreshold", 4000);
  this.purgeTimeout = conf.getLong("hbase.ipc.client.call.purge.timeout",
    2 * HConstants.DEFAULT_HBASE_RPC_TIMEOUT);
  this.warnResponseTime = conf.getInt(WARN_RESPONSE_TIME, DEFAULT_WARN_RESPONSE_TIME);
  this.warnResponseSize = conf.getInt(WARN_RESPONSE_SIZE, DEFAULT_WARN_RESPONSE_SIZE);

  // Start the listener here and let it bind to the port
  listener = new Listener(name);
  this.port = listener.getAddress().getPort();

  this.metrics = new MetricsHBaseServer(name, new MetricsHBaseServerWrapperImpl(this));
  this.tcpNoDelay = conf.getBoolean("hbase.ipc.server.tcpnodelay", true);
  this.tcpKeepAlive = conf.getBoolean("hbase.ipc.server.tcpkeepalive", true);

  this.warnDelayedCalls = conf.getInt(WARN_DELAYED_CALLS, DEFAULT_WARN_DELAYED_CALLS);
  this.delayedCalls = new AtomicInteger(0);
  this.ipcUtil = new IPCUtil(conf);


  // Create the responder here
  responder = new Responder();
  this.authorize = conf.getBoolean(HADOOP_SECURITY_AUTHORIZATION, false);
  this.userProvider = UserProvider.instantiate(conf);
  this.isSecurityEnabled = userProvider.isHBaseSecurityEnabled();
  if (isSecurityEnabled) {
    HBaseSaslRpcServer.init(conf);
  }
  this.scheduler = scheduler;
  this.scheduler.init(new RpcSchedulerContext(this));
}
 
开发者ID:grokcoder,项目名称:pbase,代码行数:57,代码来源:RpcServer.java

示例7: RpcServer

import org.apache.hadoop.hbase.security.HBaseSaslRpcServer; //导入方法依赖的package包/类
/**
 * Constructs a server listening on the named port and address.
 * @param serverInstance hosting instance of {@link Server}. We will do authentications if an
 * instance else pass null for no authentication check.
 * @param name Used keying this rpc servers' metrics and for naming the Listener thread.
 * @param services A list of services.
 * @param isa Where to listen
 * @param conf
 * @throws IOException
 */
public RpcServer(final Server serverInstance, final String name,
    final List<BlockingServiceAndInterface> services,
    final InetSocketAddress isa, Configuration conf,
    RpcScheduler scheduler)
throws IOException {
  this.serverInstance = serverInstance;
  this.services = services;
  this.isa = isa;
  this.conf = conf;
  this.socketSendBufferSize = 0;
  this.maxQueueSize =
    this.conf.getInt("ipc.server.max.callqueue.size", DEFAULT_MAX_CALLQUEUE_SIZE);
  this.readThreads = conf.getInt("ipc.server.read.threadpool.size", 10);
  this.maxIdleTime = 2*conf.getInt("ipc.client.connection.maxidletime", 1000);
  this.maxConnectionsToNuke = conf.getInt("ipc.client.kill.max", 10);
  this.thresholdIdleConnections = conf.getInt("ipc.client.idlethreshold", 4000);
  this.purgeTimeout = conf.getLong("ipc.client.call.purge.timeout",
    2 * HConstants.DEFAULT_HBASE_RPC_TIMEOUT);
  this.warnResponseTime = conf.getInt(WARN_RESPONSE_TIME, DEFAULT_WARN_RESPONSE_TIME);
  this.warnResponseSize = conf.getInt(WARN_RESPONSE_SIZE, DEFAULT_WARN_RESPONSE_SIZE);

  // Start the listener here and let it bind to the port
  listener = new Listener(name);
  this.port = listener.getAddress().getPort();

  this.metrics = new MetricsHBaseServer(name, new MetricsHBaseServerWrapperImpl(this));
  this.tcpNoDelay = conf.getBoolean("ipc.server.tcpnodelay", true);
  this.tcpKeepAlive = conf.getBoolean("ipc.server.tcpkeepalive", true);

  this.warnDelayedCalls = conf.getInt(WARN_DELAYED_CALLS, DEFAULT_WARN_DELAYED_CALLS);
  this.delayedCalls = new AtomicInteger(0);
  this.ipcUtil = new IPCUtil(conf);


  // Create the responder here
  responder = new Responder();
  this.authorize = conf.getBoolean(HADOOP_SECURITY_AUTHORIZATION, false);
  this.userProvider = UserProvider.instantiate(conf);
  this.isSecurityEnabled = userProvider.isHBaseSecurityEnabled();
  if (isSecurityEnabled) {
    HBaseSaslRpcServer.init(conf);
  }
  this.scheduler = scheduler;
  this.scheduler.init(new RpcSchedulerContext(this));
}
 
开发者ID:tenggyut,项目名称:HIndex,代码行数:56,代码来源:RpcServer.java

示例8: RpcServer

import org.apache.hadoop.hbase.security.HBaseSaslRpcServer; //导入方法依赖的package包/类
/**
 * Constructs a server listening on the named port and address.
 * @param server hosting instance of {@link Server}. We will do authentications if an
 * instance else pass null for no authentication check.
 * @param name Used keying this rpc servers' metrics and for naming the Listener thread.
 * @param services A list of services.
 * @param isa Where to listen
 * @param conf
 * @throws IOException
 */
public RpcServer(final Server server, final String name,
    final List<BlockingServiceAndInterface> services,
    final InetSocketAddress isa, Configuration conf,
    RpcScheduler scheduler)
throws IOException {
  this.server = server;
  this.services = services;
  this.isa = isa;
  this.conf = conf;
  this.socketSendBufferSize = 0;
  this.maxQueueSize =
    this.conf.getInt("ipc.server.max.callqueue.size", DEFAULT_MAX_CALLQUEUE_SIZE);
  this.readThreads = conf.getInt("ipc.server.read.threadpool.size", 10);
  this.maxIdleTime = 2*conf.getInt("ipc.client.connection.maxidletime", 1000);
  this.maxConnectionsToNuke = conf.getInt("ipc.client.kill.max", 10);
  this.thresholdIdleConnections = conf.getInt("ipc.client.idlethreshold", 4000);
  this.purgeTimeout = conf.getLong("ipc.client.call.purge.timeout",
    2 * HConstants.DEFAULT_HBASE_RPC_TIMEOUT);
  this.warnResponseTime = conf.getInt(WARN_RESPONSE_TIME, DEFAULT_WARN_RESPONSE_TIME);
  this.warnResponseSize = conf.getInt(WARN_RESPONSE_SIZE, DEFAULT_WARN_RESPONSE_SIZE);

  // Start the listener here and let it bind to the port
  listener = new Listener(name);
  this.port = listener.getAddress().getPort();

  this.metrics = new MetricsHBaseServer(name, new MetricsHBaseServerWrapperImpl(this));
  this.tcpNoDelay = conf.getBoolean("ipc.server.tcpnodelay", true);
  this.tcpKeepAlive = conf.getBoolean("ipc.server.tcpkeepalive", true);

  this.warnDelayedCalls = conf.getInt(WARN_DELAYED_CALLS, DEFAULT_WARN_DELAYED_CALLS);
  this.delayedCalls = new AtomicInteger(0);
  this.ipcUtil = new IPCUtil(conf);


  // Create the responder here
  responder = new Responder();
  this.authorize = conf.getBoolean(HADOOP_SECURITY_AUTHORIZATION, false);
  this.userProvider = UserProvider.instantiate(conf);
  this.isSecurityEnabled = userProvider.isHBaseSecurityEnabled();
  if (isSecurityEnabled) {
    HBaseSaslRpcServer.init(conf);
  }
  this.scheduler = scheduler;
  this.scheduler.init(new RpcSchedulerContext(this));
}
 
开发者ID:shenli-uiuc,项目名称:PyroDB,代码行数:56,代码来源:RpcServer.java

示例9: RpcServer

import org.apache.hadoop.hbase.security.HBaseSaslRpcServer; //导入方法依赖的package包/类
/**
 * Constructs a server listening on the named port and address.
 * @param serverInstance hosting instance of {@link Server}. We will do authentications if an
 * instance else pass null for no authentication check.
 * @param name Used keying this rpc servers' metrics and for naming the Listener thread.
 * @param services A list of services.
 * @param isa Where to listen
 * @param handlerCount the number of handler threads that will be used to process calls
 * @param priorityHandlerCount How many threads for priority handling.
 * @param conf
 * @param highPriorityLevel
 * @throws IOException
 */
public RpcServer(final Server serverInstance, final String name,
    final List<BlockingServiceAndInterface> services,
    final InetSocketAddress isa, int handlerCount, int priorityHandlerCount, Configuration conf,
    int highPriorityLevel)
throws IOException {
  this.serverInstance = serverInstance;
  this.services = services;
  this.isa = isa;
  this.conf = conf;
  this.handlerCount = handlerCount;
  this.priorityHandlerCount = priorityHandlerCount;
  this.socketSendBufferSize = 0;
  this.maxQueueLength = this.conf.getInt("ipc.server.max.callqueue.length",
    handlerCount * DEFAULT_MAX_CALLQUEUE_LENGTH_PER_HANDLER);
  this.maxQueueSize =
    this.conf.getInt("ipc.server.max.callqueue.size", DEFAULT_MAX_CALLQUEUE_SIZE);
  this.readThreads = conf.getInt("ipc.server.read.threadpool.size", 10);
  this.callQueue  = new LinkedBlockingQueue<Call>(maxQueueLength);
  if (priorityHandlerCount > 0) {
    this.priorityCallQueue = new LinkedBlockingQueue<Call>(maxQueueLength); // TODO hack on size
  } else {
    this.priorityCallQueue = null;
  }
  this.highPriorityLevel = highPriorityLevel;
  this.maxIdleTime = 2*conf.getInt("ipc.client.connection.maxidletime", 1000);
  this.maxConnectionsToNuke = conf.getInt("ipc.client.kill.max", 10);
  this.thresholdIdleConnections = conf.getInt("ipc.client.idlethreshold", 4000);
  this.purgeTimeout = conf.getLong("ipc.client.call.purge.timeout",
    2 * HConstants.DEFAULT_HBASE_RPC_TIMEOUT);
  this.numOfReplicationHandlers = conf.getInt("hbase.regionserver.replication.handler.count", 3);
  if (numOfReplicationHandlers > 0) {
    this.replicationQueue = new LinkedBlockingQueue<Call>(maxQueueLength);
  }

  this.warnResponseTime = conf.getInt(WARN_RESPONSE_TIME, DEFAULT_WARN_RESPONSE_TIME);
  this.warnResponseSize = conf.getInt(WARN_RESPONSE_SIZE, DEFAULT_WARN_RESPONSE_SIZE);

  // Start the listener here and let it bind to the port
  listener = new Listener(name);
  this.port = listener.getAddress().getPort();

  this.metrics = new MetricsHBaseServer(name, new MetricsHBaseServerWrapperImpl(this));
  this.tcpNoDelay = conf.getBoolean("ipc.server.tcpnodelay", true);
  this.tcpKeepAlive = conf.getBoolean("ipc.server.tcpkeepalive", true);

  this.warnDelayedCalls = conf.getInt(WARN_DELAYED_CALLS, DEFAULT_WARN_DELAYED_CALLS);
  this.delayedCalls = new AtomicInteger(0);
  this.ipcUtil = new IPCUtil(conf);


  // Create the responder here
  responder = new Responder();
  this.authorize = conf.getBoolean(HADOOP_SECURITY_AUTHORIZATION, false);
  this.userProvider = UserProvider.instantiate(conf);
  this.isSecurityEnabled = userProvider.isHBaseSecurityEnabled();
  if (isSecurityEnabled) {
    HBaseSaslRpcServer.init(conf);
  }
}
 
开发者ID:cloud-software-foundation,项目名称:c5,代码行数:73,代码来源:RpcServer.java

示例10: HBaseServer

import org.apache.hadoop.hbase.security.HBaseSaslRpcServer; //导入方法依赖的package包/类
protected HBaseServer(String bindAddress, int port,
                      int handlerCount,
                      int priorityHandlerCount, Configuration conf, String serverName,
                      int highPriorityLevel)
  throws IOException {
  this.bindAddress = bindAddress;
  this.conf = conf;
  this.port = port;
  this.handlerCount = handlerCount;
  this.priorityHandlerCount = priorityHandlerCount;
  this.socketSendBufferSize = 0;
  this.maxQueueLength =
    this.conf.getInt("ipc.server.max.callqueue.length",
      handlerCount * DEFAULT_MAX_CALLQUEUE_LENGTH_PER_HANDLER);
  this.maxQueueSize =
    this.conf.getInt("ipc.server.max.callqueue.size",
      DEFAULT_MAX_CALLQUEUE_SIZE);
   this.readThreads = conf.getInt(
      "ipc.server.read.threadpool.size",
      10);
  this.callQueue  = new LinkedBlockingQueue<Call>(maxQueueLength);
  if (priorityHandlerCount > 0) {
    this.priorityCallQueue = new LinkedBlockingQueue<Call>(maxQueueLength); // TODO hack on size
  } else {
    this.priorityCallQueue = null;
  }
  this.highPriorityLevel = highPriorityLevel;
  this.maxIdleTime = 2*conf.getInt("ipc.client.connection.maxidletime", 1000);
  this.maxConnectionsToNuke = conf.getInt("ipc.client.kill.max", 10);
  this.thresholdIdleConnections = conf.getInt("ipc.client.idlethreshold", 4000);
  this.purgeTimeout = conf.getLong("ipc.client.call.purge.timeout",
                                   2 * HConstants.DEFAULT_HBASE_RPC_TIMEOUT);
  this.numOfReplicationHandlers = conf.getInt("hbase.regionserver.replication.handler.count", 3);
  if (numOfReplicationHandlers > 0) {
    this.replicationQueue = new LinkedBlockingQueue<Call>(maxQueueSize);
  }
  // Start the listener here and let it bind to the port
  listener = new Listener();
  this.port = listener.getAddress().getPort();

  this.metrics = new MetricsHBaseServer(
      serverName, new MetricsHBaseServerWrapperImpl(this));
  this.tcpNoDelay = conf.getBoolean("ipc.server.tcpnodelay", true);
  this.tcpKeepAlive = conf.getBoolean("ipc.server.tcpkeepalive", true);

  this.warnDelayedCalls = conf.getInt(WARN_DELAYED_CALLS,
                                      DEFAULT_WARN_DELAYED_CALLS);
  this.delayedCalls = new AtomicInteger(0);


  // Create the responder here
  responder = new Responder();
  this.authorize =
      conf.getBoolean(HADOOP_SECURITY_AUTHORIZATION, false);
  this.isSecurityEnabled = User.isHBaseSecurityEnabled(this.conf);
  if (isSecurityEnabled) {
    HBaseSaslRpcServer.init(conf);
  }
}
 
开发者ID:daidong,项目名称:DominoHBase,代码行数:60,代码来源:HBaseServer.java


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