本文整理汇总了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();
}