congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
CuratorService.zkMkPath
Code IndexAdd Tabnine to your IDE (free)

How to use
zkMkPath
method
in
org.apache.hadoop.registry.client.impl.zk.CuratorService

Best Java code snippets using org.apache.hadoop.registry.client.impl.zk.CuratorService.zkMkPath (Showing top 12 results out of 315)

origin: org.apache.hadoop/hadoop-yarn-registry

/**
 * Create a path if it does not exist.
 * The check is poll + create; there's a risk that another process
 * may create the same path before the create() operation is executed/
 * propagated to the ZK node polled.
 *
 * @param path          path to create
 * @param acl           ACL for path -used when creating a new entry
 * @param createParents flag to trigger parent creation
 * @return true iff the path was created
 * @throws IOException
 */
@VisibleForTesting
public boolean maybeCreate(String path,
  CreateMode mode,
  List<ACL> acl,
  boolean createParents) throws IOException {
 return zkMkPath(path, mode, createParents, acl);
}
origin: io.hops/hadoop-yarn-registry

/**
 * Create a path if it does not exist.
 * The check is poll + create; there's a risk that another process
 * may create the same path before the create() operation is executed/
 * propagated to the ZK node polled.
 *
 * @param path path to create
 * @param acl ACL for path -used when creating a new entry
 * @param createParents flag to trigger parent creation
 * @return true iff the path was created
 * @throws IOException
 */
@VisibleForTesting
public boolean maybeCreate(String path,
  CreateMode mode,
  List<ACL> acl,
  boolean createParents) throws IOException {
 return zkMkPath(path, mode, createParents, acl);
}
origin: org.apache.hadoop/hadoop-yarn-registry

private void mkPath(String path, CreateMode mode) throws IOException {
 curatorService.zkMkPath(path, mode, false,
   RegistrySecurity.WorldReadWriteACL);
}
origin: io.hops/hadoop-yarn-registry

private void mkPath(String path, CreateMode mode) throws IOException {
 curatorService.zkMkPath(path, mode, false,
   RegistrySecurity.WorldReadWriteACL);
}
origin: org.apache.hadoop/hadoop-yarn-registry

/**
 * Recursively make a path.
 *
 * @param path path to create
 * @param acl  ACL for path
 * @throws IOException any problem
 */
public void zkMkParentPath(String path,
  List<ACL> acl) throws
  IOException {
 // split path into elements
 zkMkPath(RegistryPathUtils.parentOf(path),
   CreateMode.PERSISTENT, true, acl);
}
origin: io.hops/hadoop-yarn-registry

/**
 * Recursively make a path
 * @param path path to create
 * @param acl ACL for path
 * @throws IOException any problem
 */
public void zkMkParentPath(String path,
  List<ACL> acl) throws
  IOException {
 // split path into elements
 zkMkPath(RegistryPathUtils.parentOf(path),
   CreateMode.PERSISTENT, true, acl);
}
origin: io.hops/hadoop-yarn-registry

/**
 * test that ZK can write as itself
 * @throws Throwable
 */
@Test
public void testZookeeperCanWrite() throws Throwable {
 System.setProperty("curator-log-events", "true");
 startSecureZK();
 CuratorService curator = null;
 LoginContext login = login(ZOOKEEPER_LOCALHOST,
   ZOOKEEPER_CLIENT_CONTEXT,
   keytab_zk);
 try {
  logLoginDetails(ZOOKEEPER, login);
  RegistrySecurity.setZKSaslClientProperties(ZOOKEEPER,
                       ZOOKEEPER_CLIENT_CONTEXT);
  curator = startCuratorServiceInstance("ZK", true);
  LOG.info(curator.toString());
  addToTeardown(curator);
  curator.zkMkPath("/", CreateMode.PERSISTENT, false,
    RegistrySecurity.WorldReadWriteACL);
  curator.zkList("/");
  curator.zkMkPath("/zookeeper", CreateMode.PERSISTENT, false,
    RegistrySecurity.WorldReadWriteACL);
 } finally {
  logout(login);
  ServiceOperations.stop(curator);
 }
}
origin: io.hops/hadoop-yarn-registry

@Test
public void testInsecureClientToZK() throws Throwable {
 startSecureZK();
 userZookeeperToCreateRoot();
 RegistrySecurity.clearZKSaslClientProperties();
 CuratorService curatorService =
   startCuratorServiceInstance("insecure client", false);
 curatorService.zkList("/");
 curatorService.zkMkPath("", CreateMode.PERSISTENT, false,
   RegistrySecurity.WorldReadWriteACL);
}
origin: org.apache.hadoop/hadoop-yarn-registry

@Test
public void testInsecureClientToZK() throws Throwable {
 startSecureZK();
 userZookeeperToCreateRoot();
 RegistrySecurity.clearZKSaslClientProperties();
 CuratorService curatorService =
   startCuratorServiceInstance("insecure client", false);
 curatorService.zkList("/");
 curatorService.zkMkPath("", CreateMode.PERSISTENT, false,
   RegistrySecurity.WorldReadWriteACL);
}
origin: org.apache.hadoop/hadoop-yarn-registry

/**
 * test that ZK can write as itself
 * @throws Throwable
 */
@Test
public void testZookeeperCanWrite() throws Throwable {
 System.setProperty("curator-log-events", "true");
 startSecureZK();
 CuratorService curator = null;
 LoginContext login = login(ZOOKEEPER_LOCALHOST,
   ZOOKEEPER_CLIENT_CONTEXT,
   keytab_zk);
 try {
  logLoginDetails(ZOOKEEPER, login);
  RegistrySecurity.setZKSaslClientProperties(ZOOKEEPER,
                       ZOOKEEPER_CLIENT_CONTEXT);
  curator = startCuratorServiceInstance("ZK", true);
  LOG.info(curator.toString());
  addToTeardown(curator);
  curator.zkMkPath("/", CreateMode.PERSISTENT, false,
    RegistrySecurity.WorldReadWriteACL);
  curator.zkList("/");
  curator.zkMkPath("/zookeeper", CreateMode.PERSISTENT, false,
    RegistrySecurity.WorldReadWriteACL);
 } finally {
  logout(login);
  ServiceOperations.stop(curator);
 }
}
origin: io.hops/hadoop-yarn-registry

curator.zkMkPath("/", CreateMode.PERSISTENT, false,
  RegistrySecurity.WorldReadWriteACL);
ZKPathDumper pathDumper = curator.dumpPath(true);
origin: org.apache.hadoop/hadoop-yarn-registry

curator.zkMkPath("/", CreateMode.PERSISTENT, false,
  RegistrySecurity.WorldReadWriteACL);
ZKPathDumper pathDumper = curator.dumpPath(true);
org.apache.hadoop.registry.client.impl.zkCuratorServicezkMkPath

Javadoc

Create a directory. It is not an error if it already exists

Popular methods of CuratorService

  • zkPathExists
    Probe for a path existing
  • bindingDiagnosticDetails
    Get the binding diagnostics
  • dumpPath
    Return a path dumper instance which can do a full dump of the registry tree in its toString() operat
  • zkCreate
    Create a path with given data. byte[0] is used for a path without data
  • zkUpdate
    Update the data for a path
  • <init>
    Construct the service.
  • addService
  • buildConnectionString
    Override point: get the connection string used to connect to the ZK service
  • buildSecurityDiagnostics
    Build the security diagnostics string
  • checkServiceLive
    Internal check that a service is in the live state
  • createCurator
    Create a new curator instance off the root path; using configuration options provided in the service
  • createEnsembleProvider
    Create the ensemble provider for this registry, by invoking RegistryBindingSource#supplyBindingInfor
  • createCurator,
  • createEnsembleProvider,
  • createFullPath,
  • getConfig,
  • getName,
  • getRegistrySecurity,
  • getServiceState,
  • init,
  • isInState

Popular in Java

  • Reactive rest calls using spring rest template
  • onRequestPermissionsResult (Fragment)
  • addToBackStack (FragmentTransaction)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now