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


Java StreamingConnection类代码示例

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


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

示例1: newConnection

import org.apache.hive.hcatalog.streaming.StreamingConnection; //导入依赖的package包/类
private StreamingConnection newConnection(final String proxyUser)
    throws InterruptedException, ConnectException {
  try {
    return timedCall(new CallRunner1<StreamingConnection>() {
      @Override
      public StreamingConnection call() throws InterruptedException, StreamingException {
        return endPoint.newConnection(autoCreatePartitions); // could block
      }
    });
  } catch (Exception e) {
    throw new ConnectException(endPoint, e);
  }
}
 
开发者ID:moueimei,项目名称:flume-release-1.7.0,代码行数:14,代码来源:HiveWriter.java

示例2: load

import org.apache.hive.hcatalog.streaming.StreamingConnection; //导入依赖的package包/类
@Override
public StreamingConnection load(HiveEndPoint endPoint) throws StageException {
  StreamingConnection connection;
  try {
     connection = endPoint.newConnection(autoCreatePartitions, hiveConf, loginUgi);
  } catch (StreamingException | InterruptedException e) {
    throw new StageException(Errors.HIVE_09, e.toString(), e);
  }
  return connection;
}
 
开发者ID:streamsets,项目名称:datacollector,代码行数:11,代码来源:HiveTarget.java

示例3: onRemoval

import org.apache.hive.hcatalog.streaming.StreamingConnection; //导入依赖的package包/类
@Override
public void onRemoval(RemovalNotification<HiveEndPoint, StreamingConnection> notification) {
  LOG.debug("Evicting StreamingConnection from pool: {}", notification);
  StreamingConnection connection = notification.getValue();
  if (null != connection) {
    connection.close();
  }
}
 
开发者ID:streamsets,项目名称:datacollector,代码行数:9,代码来源:HiveTarget.java

示例4: destroy

import org.apache.hive.hcatalog.streaming.StreamingConnection; //导入依赖的package包/类
@Override
public void destroy() {
  if (hiveConnectionPool != null) {
    for (Map.Entry<HiveEndPoint, StreamingConnection> entry : hiveConnectionPool.asMap().entrySet()) {
      entry.getValue().close();
    }
  }
  super.destroy();
}
 
开发者ID:streamsets,项目名称:datacollector,代码行数:10,代码来源:HiveTarget.java


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