- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.apache.accumulo.fate.zookeeper.ZooReaderWriter.<init>()
方法的一些代码示例,展示了ZooReaderWriter.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZooReaderWriter.<init>()
方法的具体详情如下:
包路径:org.apache.accumulo.fate.zookeeper.ZooReaderWriter
类名称:ZooReaderWriter
方法名:<init>
暂无
代码示例来源:origin: apache/accumulo
public static synchronized ZooReaderWriter getInstance(String zookeepers, int timeInMillis,
String scheme, byte[] auth) {
if (instance == null)
instance = new ZooReaderWriter(zookeepers, timeInMillis, scheme, auth);
return instance;
}
代码示例来源:origin: apache/accumulo
public DistributedWorkQueue(String path, AccumuloConfiguration config, long timerInitialDelay,
long timerPeriod) {
this.path = path;
this.config = config;
this.timerInitialDelay = timerInitialDelay;
this.timerPeriod = timerPeriod;
zoo = new ZooReaderWriter(config);
}
代码示例来源:origin: apache/accumulo
/**
* Gets a new reader/writer.
*
* @param string
* ZooKeeper connection string
* @param timeInMillis
* session timeout in milliseconds
* @param secret
* instance secret
* @return reader/writer
*/
public IZooReaderWriter getZooReaderWriter(String string, int timeInMillis, String secret) {
return new ZooReaderWriter(string, timeInMillis, SCHEME, (USER + ":" + secret).getBytes(UTF_8));
}
}
代码示例来源:origin: apache/accumulo
private ServerContext(ServerInfo info) {
super(info, info.getSiteConfiguration());
this.info = info;
zooReaderWriter = new ZooReaderWriter(info.getSiteConfiguration());
}
代码示例来源:origin: apache/accumulo
protected synchronized IZooReaderWriter getZooReaderWriter(ClientContext context,
SiteConfiguration siteConfig, String secret) {
if (secret == null) {
secret = siteConfig.get(Property.INSTANCE_SECRET);
}
return new ZooReaderWriter(context.getZooKeepers(), context.getZooKeepersSessionTimeOut(),
SCHEME, (USER + ":" + secret).getBytes());
}
代码示例来源:origin: apache/accumulo
@SuppressFBWarnings(value = "PATH_TRAVERSAL_IN",
justification = "code runs in same security context as user who provided input")
public static void main(String[] args) throws Exception {
Logger.getRootLogger().setLevel(Level.WARN);
Opts opts = new Opts();
opts.parseArgs(RestoreZookeeper.class.getName(), args);
ZooReaderWriter zoo = new ZooReaderWriter(new SiteConfiguration());
InputStream in = System.in;
if (opts.file != null) {
in = new FileInputStream(opts.file);
}
SAXParserFactory factory = SAXParserFactory.newInstance();
// Prevent external entities by failing on any doctypes. We don't expect any doctypes, so this
// is a simple switch to remove any chance of external entities causing problems.
factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
SAXParser parser = factory.newSAXParser();
parser.parse(in, new Restore(zoo, opts.overwrite));
in.close();
}
}
代码示例来源:origin: apache/accumulo
public static void main(String[] args) {
Opts opts = new Opts();
opts.parseArgs(DumpZookeeper.class.getName(), args);
Logger.getRootLogger().setLevel(Level.WARN);
PrintStream out = System.out;
try {
zk = new ZooReaderWriter(opts.getSiteConfiguration());
if (opts.xml) {
writeXml(out, opts.root);
} else {
writeHumanReadable(out, opts.root);
}
} catch (Exception ex) {
log.error(ex, ex);
}
}
代码示例来源:origin: apache/accumulo
private static void verifyAccumuloIsDown(ServerContext context, String oldPassword)
throws Exception {
ZooReader zooReader = new ZooReaderWriter(context.getZooKeepers(),
context.getZooKeepersSessionTimeOut(), oldPassword);
String root = context.getZooKeeperRoot();
final List<String> ephemerals = new ArrayList<>();
recurse(zooReader, root, new Visitor() {
@Override
public void visit(ZooReader zoo, String path) throws Exception {
Stat stat = zoo.getStatus(path);
if (stat.getEphemeralOwner() != 0)
ephemerals.add(path);
}
});
if (ephemerals.size() > 0) {
System.err.println("The following ephemeral nodes exist, something is still running:");
for (String path : ephemerals) {
System.err.println(path);
}
throw new Exception("Accumulo must be shut down in order to run this tool.");
}
}
代码示例来源:origin: apache/accumulo
private static void deleteInstance(ServerContext context, String oldPass) throws Exception {
IZooReaderWriter orig = new ZooReaderWriter(context.getZooKeepers(),
context.getZooKeepersSessionTimeOut(), oldPass);
orig.recursiveDelete("/accumulo/" + context.getInstanceID(), NodeMissingPolicy.SKIP);
}
}
代码示例来源:origin: apache/accumulo
/**
* @param args
* : the name or UUID of the instance to be deleted
*/
public static void main(String[] args) throws Exception {
Opts opts = new Opts();
opts.parseArgs(DeleteZooInstance.class.getName(), args);
ZooReaderWriter zk = new ZooReaderWriter(new SiteConfiguration());
// try instance name:
Set<String> instances = new HashSet<>(zk.getChildren(Constants.ZROOT + Constants.ZINSTANCES));
Set<String> uuids = new HashSet<>(zk.getChildren(Constants.ZROOT));
uuids.remove("instances");
if (instances.contains(opts.instance)) {
String path = Constants.ZROOT + Constants.ZINSTANCES + "/" + opts.instance;
byte[] data = zk.getData(path, null);
deleteRetry(zk, path);
deleteRetry(zk, Constants.ZROOT + "/" + new String(data, UTF_8));
} else if (uuids.contains(opts.instance)) {
// look for the real instance name
for (String instance : instances) {
String path = Constants.ZROOT + Constants.ZINSTANCES + "/" + instance;
byte[] data = zk.getData(path, null);
if (opts.instance.equals(new String(data, UTF_8)))
deleteRetry(zk, path);
}
deleteRetry(zk, Constants.ZROOT + "/" + opts.instance);
}
}
代码示例来源:origin: apache/accumulo
private static void rewriteZooKeeperInstance(final ServerContext context,
final String newInstanceId, String oldPass, String newPass) throws Exception {
final ZooReaderWriter orig = new ZooReaderWriter(context.getZooKeepers(),
context.getZooKeepersSessionTimeOut(), oldPass);
final IZooReaderWriter new_ = new ZooReaderWriter(context.getZooKeepers(),
context.getZooKeepersSessionTimeOut(), newPass);
代码示例来源:origin: apache/accumulo
setZooReaderWriter(new ZooReaderWriter(siteConfig));
SecurityUtil.serverLogin(siteConfig);
Configuration hadoopConfig = new Configuration();
代码示例来源:origin: apache/accumulo
Path instanceDir = new Path(volDir, "instance_id");
String iid = ZooUtil.getInstanceIDFromHdfs(instanceDir, siteConf, hadoopConf);
ZooReaderWriter zoo = new ZooReaderWriter(siteConf);
代码示例来源:origin: org.apache.accumulo/accumulo-fate
public static synchronized ZooReaderWriter getInstance(String zookeepers, int timeInMillis,
String scheme, byte[] auth) {
if (instance == null)
instance = new ZooReaderWriter(zookeepers, timeInMillis, scheme, auth);
return instance;
}
代码示例来源:origin: org.apache.accumulo/accumulo-server-base
/**
* Gets a new reader/writer.
*
* @param string
* ZooKeeper connection string
* @param timeInMillis
* session timeout in milliseconds
* @param secret
* instance secret
* @return reader/writer
*/
public IZooReaderWriter getZooReaderWriter(String string, int timeInMillis, String secret) {
return new ZooReaderWriter(string, timeInMillis, SCHEME, (USER + ":" + secret).getBytes(UTF_8));
}
代码示例来源:origin: org.apache.accumulo/accumulo-shell
protected synchronized IZooReaderWriter getZooReaderWriter(Instance instance, String secret) {
if (secret == null) {
AccumuloConfiguration conf = SiteConfiguration.getInstance();
secret = conf.get(Property.INSTANCE_SECRET);
}
return new ZooReaderWriter(instance.getZooKeepers(), instance.getZooKeepersSessionTimeOut(),
SCHEME, (USER + ":" + secret).getBytes());
}
我在某个地方看到了一些值(value),但不确定它起源于我的程序。我如何找出这个值最初来自哪里? 我希望记录以下事件类型: 源自常量、算术表达式或系统调用的值 - 初始事件; 该值已分配给某个变量(或
我有一个我想要的按钮 .animate-show.ng-hide-add, .animate-show.ng-hide-remove {
本文整理了Java中org.apache.accumulo.fate.ZooStore类的一些代码示例,展示了ZooStore类的具体用法。这些代码示例主要来源于Github/Stackoverflo
本文整理了Java中org.apache.accumulo.fate.zookeeper.ZooCache类的一些代码示例,展示了ZooCache类的具体用法。这些代码示例主要来源于Github/St
本文整理了Java中org.apache.accumulo.fate.zookeeper.ZooLock类的一些代码示例,展示了ZooLock类的具体用法。这些代码示例主要来源于Github/Stac
本文整理了Java中org.apache.accumulo.fate.zookeeper.ZooReaderWriter类的一些代码示例,展示了ZooReaderWriter类的具体用法。这些代码示例
本文整理了Java中org.apache.accumulo.fate.zookeeper.ZooReader类的一些代码示例,展示了ZooReader类的具体用法。这些代码示例主要来源于Github/
本文整理了Java中org.apache.accumulo.fate.zookeeper.ZooUtil类的一些代码示例,展示了ZooUtil类的具体用法。这些代码示例主要来源于Github/Stac
本文整理了Java中org.apache.accumulo.fate.zookeeper.ZooCacheFactory类的一些代码示例,展示了ZooCacheFactory类的具体用法。这些代码示例
本文整理了Java中org.apache.accumulo.fate.zookeeper.ZooSession类的一些代码示例,展示了ZooSession类的具体用法。这些代码示例主要来源于Githu
本文整理了Java中org.apache.accumulo.fate.ZooStore.deserialize()方法的一些代码示例,展示了ZooStore.deserialize()的具体用法。这些
本文整理了Java中org.apache.accumulo.fate.ZooStore._getStatus()方法的一些代码示例,展示了ZooStore._getStatus()的具体用法。这些代码
本文整理了Java中org.apache.accumulo.fate.ZooStore.verifyReserved()方法的一些代码示例,展示了ZooStore.verifyReserved()的具
本文整理了Java中org.apache.accumulo.fate.ZooStore.unreserve()方法的一些代码示例,展示了ZooStore.unreserve()的具体用法。这些代码示例
本文整理了Java中org.apache.accumulo.fate.ZooStore.serialize()方法的一些代码示例,展示了ZooStore.serialize()的具体用法。这些代码示例
本文整理了Java中org.apache.accumulo.fate.ZooStore.parseTid()方法的一些代码示例,展示了ZooStore.parseTid()的具体用法。这些代码示例主要
本文整理了Java中org.apache.accumulo.fate.ZooStore.()方法的一些代码示例,展示了ZooStore.()的具体用法。这些代码示例主要来源于Github/Stacko
本文整理了Java中org.apache.accumulo.fate.zookeeper.ZooCache.copyStats()方法的一些代码示例,展示了ZooCache.copyStats()的具
本文整理了Java中org.apache.accumulo.fate.zookeeper.ZooCache.getChildren()方法的一些代码示例,展示了ZooCache.getChildren
本文整理了Java中org.apache.accumulo.fate.zookeeper.ZooCache.clear()方法的一些代码示例,展示了ZooCache.clear()的具体用法。这些代码
我是一名优秀的程序员,十分优秀!