org.apache.hadoop.security.Credentials.write()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(4.5k)|赞(0)|评价(0)|浏览(142)

本文整理了Java中org.apache.hadoop.security.Credentials.write()方法的一些代码示例,展示了Credentials.write()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Credentials.write()方法的具体详情如下:
包路径:org.apache.hadoop.security.Credentials
类名称:Credentials
方法名:write

Credentials.write介绍

[英]Stores all the keys to DataOutput
[中]将所有键存储到DataOutput

代码示例

代码示例来源:origin: apache/flink

protected void write(ObjectOutputStream out) throws IOException {
  this.credentials.write(out);
}

代码示例来源:origin: apache/flink

protected void write(ObjectOutputStream out) throws IOException {
  this.credentials.write(out);
}

代码示例来源:origin: org.apache.hadoop/hadoop-common

private void writeWritableOutputStream(DataOutputStream os)
  throws IOException {
 os.write(TOKEN_STORAGE_MAGIC);
 os.write(SerializedFormat.WRITABLE.value);
 write(os);
}

代码示例来源:origin: apache/storm

ObjectOutputStream out = new ObjectOutputStream(bao);
creds.write(out);
out.flush();
out.close();

代码示例来源:origin: apache/storm

ByteArrayOutputStream bao = new ByteArrayOutputStream();
ObjectOutputStream out = new ObjectOutputStream(bao);
credential.write(out);
out.flush();
out.close();

代码示例来源:origin: apache/storm

credential.write(out);
out.flush();
out.close();

代码示例来源:origin: com.alibaba.blink/flink-hadoop-compatibility

protected void write(ObjectOutputStream out) throws IOException {
  this.credentials.write(out);
}

代码示例来源:origin: org.apache.flink/flink-hadoop-compatibility

protected void write(ObjectOutputStream out) throws IOException {
  this.credentials.write(out);
}

代码示例来源:origin: com.alibaba.blink/flink-hadoop-compatibility

protected void write(ObjectOutputStream out) throws IOException {
  this.credentials.write(out);
}

代码示例来源:origin: org.apache.flink/flink-hadoop-compatibility_2.11

protected void write(ObjectOutputStream out) throws IOException {
  this.credentials.write(out);
}

代码示例来源:origin: org.apache.flink/flink-hadoop-compatibility_2.11

protected void write(ObjectOutputStream out) throws IOException {
  this.credentials.write(out);
}

代码示例来源:origin: org.apache.flink/flink-hadoop-compatibility

protected void write(ObjectOutputStream out) throws IOException {
  this.credentials.write(out);
}

代码示例来源:origin: io.hops/hadoop-common

public void writeTokenStorageToStream(DataOutputStream os)
 throws IOException {
 os.write(TOKEN_STORAGE_MAGIC);
 os.write(TOKEN_STORAGE_VERSION);
 write(os);
}

代码示例来源:origin: ch.cern.hadoop/hadoop-common

public void writeTokenStorageToStream(DataOutputStream os)
 throws IOException {
 os.write(TOKEN_STORAGE_MAGIC);
 os.write(TOKEN_STORAGE_VERSION);
 write(os);
}

代码示例来源:origin: io.prestosql.hadoop/hadoop-apache

public void writeTokenStorageToStream(DataOutputStream os)
 throws IOException {
 os.write(TOKEN_STORAGE_MAGIC);
 os.write(TOKEN_STORAGE_VERSION);
 write(os);
}

代码示例来源:origin: com.github.jiayuhan-it/hadoop-common

public void writeTokenStorageToStream(DataOutputStream os)
 throws IOException {
 os.write(TOKEN_STORAGE_MAGIC);
 os.write(TOKEN_STORAGE_VERSION);
 write(os);
}

代码示例来源:origin: ch.cern.hadoop/hadoop-hdfs

@Override
 public Void run() throws IOException {
  final Credentials ts = DelegationTokenSecretManager.createCredentials(
    nn, ugi, renewerFinal);
  ts.write(dosFinal);
  return null;
 }
});

代码示例来源:origin: io.prestosql.hadoop/hadoop-apache

@Override
 public Void run() throws IOException {
  final Credentials ts = DelegationTokenSecretManager.createCredentials(
    nn, ugi, renewerFinal);
  ts.write(dosFinal);
  return null;
 }
});

代码示例来源:origin: org.apache.tez/tez-runtime-internals

@Override
public void write(DataOutput out) throws IOException {
 out.writeBoolean(shouldDie);
 if (taskSpec != null) {
  out.writeBoolean(true);
  taskSpec.write(out);
 } else {
  out.writeBoolean(false);
 }
 if (additionalResources != null) {
  out.writeInt(additionalResources.size());
  for (Entry<String, TezLocalResource> lrEntry : additionalResources.entrySet()) {
   out.writeUTF(lrEntry.getKey());
   lrEntry.getValue().write(out);
  }
 } else {
  out.writeInt(-1);
 }
 out.writeBoolean(credentialsChanged);
 if (credentialsChanged) {
  out.writeBoolean(credentials != null);
  if (credentials != null) {
   credentials.write(out);
  }
 }
}

代码示例来源:origin: ch.cern.hadoop/hadoop-hdfs

@Override
 public void handle(Channel channel, Token<DelegationTokenIdentifier> token,
   String serviceUrl) throws IOException {
  Assert.assertEquals(testToken, token);
  Credentials creds = new Credentials();
  creds.addToken(new Text(serviceUrl), token);
  DataOutputBuffer out = new DataOutputBuffer();
  creds.write(out);
  int fileLength = out.getData().length;
  ChannelBuffer cbuffer = ChannelBuffers.buffer(fileLength);
  cbuffer.writeBytes(out.getData());
  HttpResponse response = new DefaultHttpResponse(HTTP_1_1, OK);
  response.setHeader(HttpHeaders.Names.CONTENT_LENGTH,
    String.valueOf(fileLength));
  response.setContent(cbuffer);
  channel.write(response).addListener(ChannelFutureListener.CLOSE);
 }
}

相关文章