本文整理了Java中org.apache.accumulo.core.client.Connector.from()
方法的一些代码示例,展示了Connector.from()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Connector.from()
方法的具体详情如下:
包路径:org.apache.accumulo.core.client.Connector
类名称:Connector
方法名:from
[英]Creates a Connector from an AccumuloClient. This Connector will no longer work after the AccumuloClient is closed. Also anything derived from the Connector (like a Scanner for example) is unlikely to work after the AccumuloClient is closed.
[中]从AccumuloClient创建连接器。AccumuloClient关闭后,此接头将不再工作。此外,在AccumuloClient关闭后,从连接器派生的任何东西(例如扫描仪)都不太可能工作。
代码示例来源:origin: apache/accumulo
@Override
public org.apache.accumulo.core.client.Connector getConnector(String principal,
AuthenticationToken token) throws AccumuloException, AccumuloSecurityException {
return org.apache.accumulo.core.client.Connector.from(context);
}
};
代码示例来源:origin: apache/accumulo
@SuppressWarnings("deprecation")
private void putConnector(Bindings b, AccumuloClient client) {
try {
b.put("connection", org.apache.accumulo.core.client.Connector.from(client));
} catch (AccumuloSecurityException | AccumuloException e) {
throw new RuntimeException(e);
}
}
代码示例来源:origin: org.apache.accumulo/accumulo-client-mapreduce
/**
* Initializes an Accumulo {@link org.apache.accumulo.core.client.Instance} based on the
* configuration.
*
* @param implementingClass
* the class whose name will be used as a prefix for the property configuration key
* @param conf
* the Hadoop configuration object to configure
* @return an Accumulo instance
* @since 1.6.0
* @deprecated since 2.0.0, replaced by {@link #getClientInfo(Class, Configuration)}
*/
@Deprecated
public static org.apache.accumulo.core.client.Instance getInstance(Class<?> implementingClass,
Configuration conf) {
return org.apache.accumulo.core.client.Connector.from(getClient(implementingClass, conf))
.getInstance();
}
内容来源于网络,如有侵权,请联系作者删除!