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


Java DelegationTokenFetcher.cancelDelegationToken方法代码示例

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


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

示例1: expectedTokenCancelFail

import org.apache.hadoop.hdfs.tools.DelegationTokenFetcher; //导入方法依赖的package包/类
/**
 * try cancel token without http server with IOException
 */
@Test
public void expectedTokenCancelFail() throws AuthenticationException {
  try {
    DelegationTokenFetcher.cancelDelegationToken(connectionFactory, serviceUrl, testToken);
    fail("Token fetcher shouldn't be able to cancel tokens in absense of NN");
  } catch (IOException ex) {
  } 
}
 
开发者ID:naver,项目名称:hadoop,代码行数:12,代码来源:TestDelegationTokenRemoteFetcher.java

示例2: testCancelTokenFromHttp

import org.apache.hadoop.hdfs.tools.DelegationTokenFetcher; //导入方法依赖的package包/类
/**
 *
 */
@Test
public void testCancelTokenFromHttp() throws IOException,
    AuthenticationException {
  bootstrap = startHttpServer(httpPort, testToken, serviceUrl);
  DelegationTokenFetcher.cancelDelegationToken(connectionFactory, serviceUrl,
      testToken);
  if (assertionError != null)
    throw assertionError;
}
 
开发者ID:naver,项目名称:hadoop,代码行数:13,代码来源:TestDelegationTokenRemoteFetcher.java

示例3: cancel

import org.apache.hadoop.hdfs.tools.DelegationTokenFetcher; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public void cancel(Token<?> token, 
                   Configuration conf) throws IOException {
  // update the kerberos credentials, if they are coming from a keytab
  UserGroupInformation.getLoginUser().checkTGTAndReloginFromKeytab();
  // use http to cancel the token
  InetSocketAddress serviceAddr = SecurityUtil.getTokenServiceAddr(token);
  DelegationTokenFetcher.cancelDelegationToken
    (DFSUtil.createUri("http", serviceAddr).toString(),
     (Token<DelegationTokenIdentifier>) token);
}
 
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:13,代码来源:HftpFileSystem.java

示例4: cancel

import org.apache.hadoop.hdfs.tools.DelegationTokenFetcher; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public void cancel(Token<?> token, Configuration conf) throws IOException {
  // update the kerberos credentials, if they are coming from a keytab
  UserGroupInformation.getLoginUser().checkTGTAndReloginFromKeytab();
  // use http to cancel the token
  InetSocketAddress serviceAddr = SecurityUtil.getTokenServiceAddr(token);
  DelegationTokenFetcher.cancelDelegationToken(
      DFSUtil.createUri("http", serviceAddr).toString(),
      (Token<DelegationTokenIdentifier>) token);
}
 
开发者ID:hopshadoop,项目名称:hops,代码行数:12,代码来源:HftpFileSystem.java

示例5: cancel

import org.apache.hadoop.hdfs.tools.DelegationTokenFetcher; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public void cancel(Token<?> token, 
                   Configuration conf) throws IOException {
  // update the kerberos credentials, if they are coming from a keytab
  UserGroupInformation.getLoginUser().checkTGTAndReloginFromKeytab();
  InetSocketAddress serviceAddr = SecurityUtil.getTokenServiceAddr(token);
  DelegationTokenFetcher.cancelDelegationToken
    (DFSUtil.createUri(getUnderlyingProtocol(), serviceAddr).toString(),
     (Token<DelegationTokenIdentifier>) token);
}
 
开发者ID:chendave,项目名称:hadoop-TCP,代码行数:12,代码来源:HftpFileSystem.java

示例6: cancel

import org.apache.hadoop.hdfs.tools.DelegationTokenFetcher; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
 @Override
 public void cancel(Token<?> token, 
                    Configuration conf) throws IOException {
   // update the kerberos credentials, if they are coming from a keytab
   UserGroupInformation.getLoginUser().checkTGTAndReloginFromKeytab();
   // use http to cancel the token
   InetSocketAddress serviceAddr = SecurityUtil.getTokenServiceAddr(token);
   DelegationTokenFetcher.
cancelDelegationToken(DFSUtil.createUri(getUnderlyingProtocol(), 
			  serviceAddr).toString(),
	(Token<DelegationTokenIdentifier>) token);
 }
 
开发者ID:Seagate,项目名称:hadoop-on-lustre,代码行数:14,代码来源:HftpFileSystem.java


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