本文整理匯總了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);
}
}
示例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;
}
示例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();
}
}
示例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();
}