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


Java SaslStatus类代码示例

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


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

示例1: doRawSaslReply

import org.apache.hadoop.hbase.security.HBaseSaslRpcServer.SaslStatus; //导入依赖的package包/类
/**
 * No protobuf encoding of raw sasl messages
 */
private void doRawSaslReply(SaslStatus status, Writable rv,
    String errorClass, String error) throws IOException {
  //In my testing, have noticed that sasl messages are usually
  //in the ballpark of 100-200. That's why the initialcapacity is 256.
  ByteBufferOutputStream saslResponse = new ByteBufferOutputStream(256);
  DataOutputStream out = new DataOutputStream(saslResponse);
  out.writeInt(status.state); // write status
  if (status == SaslStatus.SUCCESS) {
    rv.write(out);
  } else {
    WritableUtils.writeString(out, errorClass);
    WritableUtils.writeString(out, error);
  }
  saslCall.setSaslTokenResponse(saslResponse.getByteBuffer());
  saslCall.responder = responder;
  saslCall.sendResponseIfReady();
}
 
开发者ID:daidong,项目名称:DominoHBase,代码行数:21,代码来源:HBaseServer.java

示例2: readStatus

import org.apache.hadoop.hbase.security.HBaseSaslRpcServer.SaslStatus; //导入依赖的package包/类
private static void readStatus(DataInputStream inStream) throws IOException {
  int id = inStream.readInt(); // read and discard dummy id
  int status = inStream.readInt(); // read status
  if (status != SaslStatus.SUCCESS.state) {
    throw new RemoteException(WritableUtils.readString(inStream),
        WritableUtils.readString(inStream));
  }
}
 
开发者ID:wanhao,项目名称:IRIndex,代码行数:9,代码来源:HBaseSaslRpcClient.java

示例3: doSaslReply

import org.apache.hadoop.hbase.security.HBaseSaslRpcServer.SaslStatus; //导入依赖的package包/类
private void doSaslReply(SaslStatus status, Writable rv,
    String errorClass, String error) throws IOException {
  saslCall.setResponse(rv,
      status == SaslStatus.SUCCESS ? Status.SUCCESS : Status.ERROR,
       errorClass, error);
  saslCall.responder = responder;
  saslCall.sendResponseIfReady();
}
 
开发者ID:wanhao,项目名称:IRIndex,代码行数:9,代码来源:SecureServer.java

示例4: readStatus

import org.apache.hadoop.hbase.security.HBaseSaslRpcServer.SaslStatus; //导入依赖的package包/类
private static void readStatus(DataInputStream inStream) throws IOException {
  int status = inStream.readInt(); // read status
  if (status != SaslStatus.SUCCESS.state) {
    throw new RemoteException(WritableUtils.readString(inStream),
        WritableUtils.readString(inStream));
  }
}
 
开发者ID:daidong,项目名称:DominoHBase,代码行数:8,代码来源:HBaseSaslRpcClient.java


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