Tabnine Logo
CuratorService.createFullPath
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: io.hops/hadoop-yarn-registry

/**
 * Read data on a path
 * @param path path of operation
 * @return the data
 * @throws IOException read failure
 */
public byte[] zkRead(String path) throws IOException {
 checkServiceLive();
 String fullpath = createFullPath(path);
 try {
  if (LOG.isDebugEnabled()) {
   LOG.debug("Reading {}", fullpath);
  }
  return curator.getData().forPath(fullpath);
 } catch (Exception e) {
  throw operationFailure(fullpath, "read()", e);
 }
}
origin: org.apache.hadoop/hadoop-yarn-registry

/**
 * Read data on a path.
 *
 * @param path path of operation
 * @return the data
 * @throws IOException read failure
 */
public byte[] zkRead(String path) throws IOException {
 checkServiceLive();
 String fullpath = createFullPath(path);
 try {
  if (LOG.isDebugEnabled()) {
   LOG.debug("Reading {}", fullpath);
  }
  return curator.getData().forPath(fullpath);
 } catch (Exception e) {
  throw operationFailure(fullpath, "read()", e);
 }
}
origin: io.hops/hadoop-yarn-registry

/**
 * List all children of a path
 * @param path path of operation
 * @return a possibly empty list of children
 * @throws IOException
 */
public List<String> zkList(String path) throws IOException {
 checkServiceLive();
 String fullpath = createFullPath(path);
 try {
  if (LOG.isDebugEnabled()) {
   LOG.debug("ls {}", fullpath);
  }
  GetChildrenBuilder builder = curator.getChildren();
  List<String> children = builder.forPath(fullpath);
  return children;
 } catch (Exception e) {
  throw operationFailure(path, "ls()", e);
 }
}
origin: org.apache.hadoop/hadoop-yarn-registry

/**
 * List all children of a path.
 *
 * @param path path of operation
 * @return a possibly empty list of children
 * @throws IOException
 */
public List<String> zkList(String path) throws IOException {
 checkServiceLive();
 String fullpath = createFullPath(path);
 try {
  if (LOG.isDebugEnabled()) {
   LOG.debug("ls {}", fullpath);
  }
  GetChildrenBuilder builder = curator.getChildren();
  List<String> children = builder.forPath(fullpath);
  return children;
 } catch (Exception e) {
  throw operationFailure(path, "ls()", e);
 }
}
origin: io.hops/hadoop-yarn-registry

/**
 * Update the data for a path
 * @param path path of operation
 * @param data new data
 * @throws IOException
 */
public void zkUpdate(String path, byte[] data) throws IOException {
 Preconditions.checkArgument(data != null, "null data");
 checkServiceLive();
 path = createFullPath(path);
 try {
  if (LOG.isDebugEnabled()) {
   LOG.debug("Updating {} with {} bytes", path, data.length);
  }
  curator.setData().forPath(path, data);
 } catch (Exception e) {
  throw operationFailure(path, "update()", e);
 }
}
origin: org.apache.hadoop/hadoop-yarn-registry

/**
 * Update the data for a path.
 *
 * @param path path of operation
 * @param data new data
 * @throws IOException
 */
public void zkUpdate(String path, byte[] data) throws IOException {
 Preconditions.checkArgument(data != null, "null data");
 checkServiceLive();
 path = createFullPath(path);
 try {
  if (LOG.isDebugEnabled()) {
   LOG.debug("Updating {} with {} bytes", path, data.length);
  }
  curator.setData().forPath(path, data);
 } catch (Exception e) {
  throw operationFailure(path, "update()", e);
 }
}
origin: org.apache.hadoop/hadoop-yarn-registry

/**
 * Stat the file.
 *
 * @param path path of operation
 * @return a curator stat entry
 * @throws IOException           on a failure
 * @throws PathNotFoundException if the path was not found
 */
public Stat zkStat(String path) throws IOException {
 checkServiceLive();
 String fullpath = createFullPath(path);
 Stat stat;
 try {
  if (LOG.isDebugEnabled()) {
   LOG.debug("Stat {}", fullpath);
  }
  stat = curator.checkExists().forPath(fullpath);
 } catch (Exception e) {
  throw operationFailure(fullpath, "read()", e);
 }
 if (stat == null) {
  throw new PathNotFoundException(path);
 }
 return stat;
}
origin: io.hops/hadoop-yarn-registry

/**
 * Stat the file
 * @param path path of operation
 * @return a curator stat entry
 * @throws IOException on a failure
 * @throws PathNotFoundException if the path was not found
 */
public Stat zkStat(String path) throws IOException {
 checkServiceLive();
 String fullpath = createFullPath(path);
 Stat stat;
 try {
  if (LOG.isDebugEnabled()) {
   LOG.debug("Stat {}", fullpath);
  }
  stat = curator.checkExists().forPath(fullpath);
 } catch (Exception e) {
  throw operationFailure(fullpath, "read()", e);
 }
 if (stat == null) {
  throw new PathNotFoundException(path);
 }
 return stat;
}
origin: io.hops/hadoop-yarn-registry

/**
 * Create a path with given data. byte[0] is used for a path
 * without data
 * @param path path of operation
 * @param data initial data
 * @param acls
 * @throws IOException
 */
public void zkCreate(String path,
  CreateMode mode,
  byte[] data,
  List<ACL> acls) throws IOException {
 Preconditions.checkArgument(data != null, "null data");
 checkServiceLive();
 String fullpath = createFullPath(path);
 try {
  if (LOG.isDebugEnabled()) {
   LOG.debug("Creating {} with {} bytes of data and ACL {}",
     fullpath, data.length,
     new RegistrySecurity.AclListInfo(acls));
  }
  curator.create().withMode(mode).withACL(acls).forPath(fullpath, data);
 } catch (Exception e) {
  throw operationFailure(fullpath, "create()", e, acls);
 }
}
origin: io.hops/hadoop-yarn-registry

 throws IOException {
checkServiceLive();
path = createFullPath(path);
if (acls == null || acls.isEmpty()) {
 throw new NoPathPermissionsException(path, "Empty ACL list");
origin: org.apache.hadoop/hadoop-yarn-registry

/**
 * Create a path with given data. byte[0] is used for a path
 * without data.
 *
 * @param path path of operation
 * @param data initial data
 * @param acls
 * @throws IOException
 */
public void zkCreate(String path,
  CreateMode mode,
  byte[] data,
  List<ACL> acls) throws IOException {
 Preconditions.checkArgument(data != null, "null data");
 checkServiceLive();
 String fullpath = createFullPath(path);
 try {
  if (LOG.isDebugEnabled()) {
   LOG.debug("Creating {} with {} bytes of data and ACL {}",
     fullpath, data.length,
     new RegistrySecurity.AclListInfo(acls));
  }
  curator.create().withMode(mode).withACL(acls).forPath(fullpath, data);
 } catch (Exception e) {
  throw operationFailure(fullpath, "create()", e, acls);
 }
}
origin: io.hops/hadoop-yarn-registry

/**
 * Get the ACLs of a path
 * @param path path of operation
 * @return a possibly empty list of ACLs
 * @throws IOException
 */
public List<ACL> zkGetACLS(String path) throws IOException {
 checkServiceLive();
 String fullpath = createFullPath(path);
 List<ACL> acls;
 try {
  if (LOG.isDebugEnabled()) {
   LOG.debug("GetACLS {}", fullpath);
  }
  acls = curator.getACL().forPath(fullpath);
 } catch (Exception e) {
  throw operationFailure(fullpath, "read()", e);
 }
 if (acls == null) {
  throw new PathNotFoundException(path);
 }
 return acls;
}
origin: org.apache.hadoop/hadoop-yarn-registry

 BackgroundCallback backgroundCallback) throws IOException {
checkServiceLive();
String fullpath = createFullPath(path);
try {
 if (LOG.isDebugEnabled()) {
origin: org.apache.hadoop/hadoop-yarn-registry

/**
 * Get the ACLs of a path.
 *
 * @param path path of operation
 * @return a possibly empty list of ACLs
 * @throws IOException
 */
public List<ACL> zkGetACLS(String path) throws IOException {
 checkServiceLive();
 String fullpath = createFullPath(path);
 List<ACL> acls;
 try {
  if (LOG.isDebugEnabled()) {
   LOG.debug("GetACLS {}", fullpath);
  }
  acls = curator.getACL().forPath(fullpath);
 } catch (Exception e) {
  throw operationFailure(fullpath, "read()", e);
 }
 if (acls == null) {
  throw new PathNotFoundException(path);
 }
 return acls;
}
origin: org.apache.hadoop/hadoop-yarn-registry

 throws IOException {
checkServiceLive();
path = createFullPath(path);
if (acls == null || acls.isEmpty()) {
 throw new NoPathPermissionsException(path, "Empty ACL list");
origin: io.hops/hadoop-yarn-registry

 BackgroundCallback backgroundCallback) throws IOException {
checkServiceLive();
String fullpath = createFullPath(path);
try {
 if (LOG.isDebugEnabled()) {
org.apache.hadoop.registry.client.impl.zkCuratorServicecreateFullPath

Javadoc

Create a full path from the registry root and the supplied subdir

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
  • zkMkPath
    Create a directory. It is not an error if it already exists
  • 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
  • checkServiceLive,
  • createCurator,
  • createEnsembleProvider,
  • getConfig,
  • getName,
  • getRegistrySecurity,
  • getServiceState,
  • init,
  • isInState

Popular in Java

  • Reactive rest calls using spring rest template
  • getSharedPreferences (Context)
  • addToBackStack (FragmentTransaction)
  • requestLocationUpdates (LocationManager)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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