本文整理了Java中org.apache.accumulo.server.master.state.ZooTabletStateStore.<init>()
方法的一些代码示例,展示了ZooTabletStateStore.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZooTabletStateStore.<init>()
方法的具体详情如下:
包路径:org.apache.accumulo.server.master.state.ZooTabletStateStore
类名称:ZooTabletStateStore
方法名:<init>
暂无
代码示例来源:origin: apache/accumulo
protected static TabletStateStore getStoreForTablet(KeyExtent extent, ServerContext context) {
if (extent.isRootTablet()) {
return new ZooTabletStateStore(context);
} else if (extent.isMeta()) {
return new RootTabletStateStore(context);
} else {
return new MetaDataStateStore(context);
}
}
}
代码示例来源:origin: apache/accumulo
scanning.set(true);
Iterator<TabletLocationState> zooScanner = new ZooTabletStateStore(context).iterator();
代码示例来源:origin: apache/accumulo
private static Pair<Text,KeyExtent> verifyRootTablet(ServerContext context,
TServerInstance instance) throws AccumuloException {
ZooTabletStateStore store = new ZooTabletStateStore(context);
if (!store.iterator().hasNext()) {
throw new AccumuloException("Illegal state: location is not set in zookeeper");
}
TabletLocationState next = store.iterator().next();
if (!instance.equals(next.future)) {
throw new AccumuloException("Future location is not to this server for the root tablet");
}
if (next.current != null) {
throw new AccumuloException("Root tablet already has a location set");
}
try {
return new Pair<>(new Text(MetadataTableUtil.getRootTabletDir(context)), null);
} catch (IOException e) {
throw new AccumuloException(e);
}
}
代码示例来源:origin: apache/accumulo
watchers.add(new TabletGroupWatcher(this, new ZooTabletStateStore(new ZooStore(context)),
watchers.get(1)) {
@Override
代码示例来源:origin: org.apache.accumulo/accumulo-server
public static void unassign(TabletLocationState tls) throws DistributedStoreException {
TabletStateStore store;
if (tls.extent.isRootTablet()) {
store = new ZooTabletStateStore();
} else {
store = new MetaDataStateStore();
}
store.unassign(Collections.singletonList(tls));
}
代码示例来源:origin: org.apache.accumulo/accumulo-server
public static void setLocation(Assignment assignment) throws DistributedStoreException {
TabletStateStore store;
if (assignment.tablet.isRootTablet()) {
store = new ZooTabletStateStore();
} else {
store = new MetaDataStateStore();
}
store.setLocations(Collections.singletonList(assignment));
}
代码示例来源:origin: org.apache.accumulo/accumulo-server
private static Pair<Text,KeyExtent> verifyRootTablet(KeyExtent extent, TServerInstance instance) throws DistributedStoreException, AccumuloException {
ZooTabletStateStore store = new ZooTabletStateStore();
if (!store.iterator().hasNext()) {
throw new AccumuloException("Illegal state: location is not set in zookeeper");
}
TabletLocationState next = store.iterator().next();
if (!instance.equals(next.future)) {
throw new AccumuloException("Future location is not to this server for the root tablet");
}
if (next.current != null) {
throw new AccumuloException("Root tablet already has a location set");
}
return new Pair<Text,KeyExtent>(new Text(Constants.ZROOT_TABLET), null);
}
代码示例来源:origin: org.apache.accumulo/accumulo-server-base
protected static TabletStateStore getStoreForTablet(KeyExtent extent,
AccumuloServerContext context) throws DistributedStoreException {
if (extent.isRootTablet()) {
return new ZooTabletStateStore();
} else if (extent.isMeta()) {
return new RootTabletStateStore(context);
} else {
return new MetaDataStateStore(context);
}
}
}
代码示例来源:origin: org.apache.accumulo/accumulo-server-base
zooScanner = new ZooTabletStateStore().iterator();
} catch (DistributedStoreException e) {
throw new AccumuloException(e);
代码示例来源:origin: org.apache.accumulo/accumulo-tserver
private static Pair<Text,KeyExtent> verifyRootTablet(KeyExtent extent, TServerInstance instance)
throws DistributedStoreException, AccumuloException {
ZooTabletStateStore store = new ZooTabletStateStore();
if (!store.iterator().hasNext()) {
throw new AccumuloException("Illegal state: location is not set in zookeeper");
}
TabletLocationState next = store.iterator().next();
if (!instance.equals(next.future)) {
throw new AccumuloException("Future location is not to this server for the root tablet");
}
if (next.current != null) {
throw new AccumuloException("Root tablet already has a location set");
}
try {
return new Pair<>(new Text(MetadataTableUtil.getRootTabletDir()), null);
} catch (IOException e) {
throw new AccumuloException(e);
}
}
代码示例来源:origin: org.apache.accumulo/accumulo-server
final TabletStateStore stores[] = {new ZooTabletStateStore(new ZooStore(zroot)),
代码示例来源:origin: org.apache.accumulo/accumulo-master
watchers.add(new TabletGroupWatcher(this, new ZooTabletStateStore(new ZooStore(zroot)),
watchers.get(1)) {
@Override
内容来源于网络,如有侵权,请联系作者删除!