當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。