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

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

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

origin: io.hops/hadoop-yarn-registry

/**
 * Create an IOE when an operation fails
 * @param path path of operation
 * @param operation operation attempted
 * @param exception caught the exception caught
 * @return an IOE to throw that contains the path and operation details.
 */
protected IOException operationFailure(String path,
  String operation,
  Exception exception) {
 return operationFailure(path, operation, exception, null);
}
origin: org.apache.hadoop/hadoop-yarn-registry

/**
 * Create an IOE when an operation fails.
 *
 * @param path      path of operation
 * @param operation operation attempted
 * @param exception caught the exception caught
 * @return an IOE to throw that contains the path and operation details.
 */
protected IOException operationFailure(String path,
  String operation,
  Exception exception) {
 return operationFailure(path, operation, exception, null);
}
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: 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: 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

/**
 * 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

throw operationFailure(path, "mkdir() ", e, acls);
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: 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

throw operationFailure(fullpath, "delete()", e);
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

throw operationFailure(path, "mkdir() ", e, acls);
origin: io.hops/hadoop-yarn-registry

throw operationFailure(fullpath, "delete()", e);
org.apache.hadoop.registry.client.impl.zkCuratorServiceoperationFailure

Javadoc

Create an IOE when an operation fails

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,
  • createFullPath,
  • getConfig,
  • getName,
  • getRegistrySecurity,
  • getServiceState,
  • init,
  • isInState

Popular in Java

  • Updating database using SQL prepared statement
  • getContentResolver (Context)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getApplicationContext (Context)
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Github Copilot alternatives
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