congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ErrorType
Code IndexAdd Tabnine to your IDE (free)

How to use
ErrorType
in
org.apache.hive.hcatalog.common

Best Java code snippets using org.apache.hive.hcatalog.common.ErrorType (Showing top 17 results out of 315)

origin: apache/hive

/**
 * Builds the error message string. The error type message is appended with the extra message. If appendCause
 * is true for the error type, then the message of the cause also is added to the message.
 * @param type the error type
 * @param extraMessage the extra message string
 * @param cause the cause for the exception
 * @return the exception message string
 */
public static String buildErrorMessage(ErrorType type, String extraMessage, Throwable cause) {
 //Initial message is just the error type message
 StringBuilder message = new StringBuilder(HCatException.class.getName());
 message.append(" : " + type.getErrorCode());
 message.append(" : " + type.getErrorMessage());
 if (extraMessage != null) {
  //Add the extra message value to buffer
  message.append(" : " + extraMessage);
 }
 if (type.appendCauseMessage()) {
  if (cause != null) {
   //Add the cause message to buffer
   message.append(". Cause : " + cause.toString());
  }
 }
 return message.toString();
}
origin: apache/hive

/**
 * Is this a retriable error.
 * @return is it retriable
 */
public boolean isRetriable() {
 return errorType.isRetriable();
}
origin: apache/hive

/**
 * Gets the error code.
 * @return the error code
 */
public int getErrorCode() {
 return errorType.getErrorCode();
}
origin: stackoverflow.com

 for(ErrorType errorType: validationResult.getErrors()) {
  fieldErrorCodes = new String[]{
    errorType.getErrorCode()
  };

  bindingResult.addError(new ObjectError(errorType.getProperty(), fieldErrorCodes , null, null));

  if(errorType.getProperty().length() > 0) {
    bindingResult.addError(new FieldError(bindingResult.getObjectName(), errorType.getProperty(), null,
        false, fieldErrorCodes, null, null));
  }
}
origin: apache/hive

exc = e;
assertTrue(exc instanceof HCatException);
assertTrue(ErrorType.ERROR_DUPLICATE_PARTITION.equals(((HCatException) exc).getErrorType()));
origin: com.github.hyukjinkwon.hcatalog/hive-hcatalog-core

/**
 * Gets the error code.
 * @return the error code
 */
public int getErrorCode() {
 return errorType.getErrorCode();
}
origin: org.spark-project.hive.hcatalog/hive-hcatalog-core

/**
 * Builds the error message string. The error type message is appended with the extra message. If appendCause
 * is true for the error type, then the message of the cause also is added to the message.
 * @param type the error type
 * @param extraMessage the extra message string
 * @param cause the cause for the exception
 * @return the exception message string
 */
public static String buildErrorMessage(ErrorType type, String extraMessage, Throwable cause) {
 //Initial message is just the error type message
 StringBuffer message = new StringBuffer(HCatException.class.getName());
 message.append(" : " + type.getErrorCode());
 message.append(" : " + type.getErrorMessage());
 if (extraMessage != null) {
  //Add the extra message value to buffer
  message.append(" : " + extraMessage);
 }
 if (type.appendCauseMessage()) {
  if (cause != null) {
   //Add the cause message to buffer
   message.append(". Cause : " + cause.toString());
  }
 }
 return message.toString();
}
origin: org.spark-project.hive.hcatalog/hive-hcatalog-core

/**
 * Gets the error code.
 * @return the error code
 */
public int getErrorCode() {
 return errorType.getErrorCode();
}
origin: org.apache.hive.hcatalog/hive-hcatalog-core

/**
 * Is this a retriable error.
 * @return is it retriable
 */
public boolean isRetriable() {
 return errorType.isRetriable();
}
origin: com.github.hyukjinkwon.hcatalog/hive-hcatalog-core

/**
 * Builds the error message string. The error type message is appended with the extra message. If appendCause
 * is true for the error type, then the message of the cause also is added to the message.
 * @param type the error type
 * @param extraMessage the extra message string
 * @param cause the cause for the exception
 * @return the exception message string
 */
public static String buildErrorMessage(ErrorType type, String extraMessage, Throwable cause) {
 //Initial message is just the error type message
 StringBuffer message = new StringBuffer(HCatException.class.getName());
 message.append(" : " + type.getErrorCode());
 message.append(" : " + type.getErrorMessage());
 if (extraMessage != null) {
  //Add the extra message value to buffer
  message.append(" : " + extraMessage);
 }
 if (type.appendCauseMessage()) {
  if (cause != null) {
   //Add the cause message to buffer
   message.append(". Cause : " + cause.toString());
  }
 }
 return message.toString();
}
origin: org.apache.hive.hcatalog/hive-hcatalog-core

/**
 * Gets the error code.
 * @return the error code
 */
public int getErrorCode() {
 return errorType.getErrorCode();
}
origin: org.spark-project.hive.hcatalog/hive-hcatalog-core

/**
 * Is this a retriable error.
 * @return is it retriable
 */
public boolean isRetriable() {
 return errorType.isRetriable();
}
origin: org.apache.hive.hcatalog/hive-hcatalog-core

/**
 * Builds the error message string. The error type message is appended with the extra message. If appendCause
 * is true for the error type, then the message of the cause also is added to the message.
 * @param type the error type
 * @param extraMessage the extra message string
 * @param cause the cause for the exception
 * @return the exception message string
 */
public static String buildErrorMessage(ErrorType type, String extraMessage, Throwable cause) {
 //Initial message is just the error type message
 StringBuilder message = new StringBuilder(HCatException.class.getName());
 message.append(" : " + type.getErrorCode());
 message.append(" : " + type.getErrorMessage());
 if (extraMessage != null) {
  //Add the extra message value to buffer
  message.append(" : " + extraMessage);
 }
 if (type.appendCauseMessage()) {
  if (cause != null) {
   //Add the cause message to buffer
   message.append(". Cause : " + cause.toString());
  }
 }
 return message.toString();
}
origin: com.facebook.presto.hive/hive-apache

/**
 * Gets the error code.
 * @return the error code
 */
public int getErrorCode() {
 return errorType.getErrorCode();
}
origin: com.facebook.presto.hive/hive-apache

/**
 * Is this a retriable error.
 * @return is it retriable
 */
public boolean isRetriable() {
 return errorType.isRetriable();
}
origin: com.facebook.presto.hive/hive-apache

/**
 * Builds the error message string. The error type message is appended with the extra message. If appendCause
 * is true for the error type, then the message of the cause also is added to the message.
 * @param type the error type
 * @param extraMessage the extra message string
 * @param cause the cause for the exception
 * @return the exception message string
 */
public static String buildErrorMessage(ErrorType type, String extraMessage, Throwable cause) {
 //Initial message is just the error type message
 StringBuffer message = new StringBuffer(HCatException.class.getName());
 message.append(" : " + type.getErrorCode());
 message.append(" : " + type.getErrorMessage());
 if (extraMessage != null) {
  //Add the extra message value to buffer
  message.append(" : " + extraMessage);
 }
 if (type.appendCauseMessage()) {
  if (cause != null) {
   //Add the cause message to buffer
   message.append(". Cause : " + cause.toString());
  }
 }
 return message.toString();
}
origin: com.github.hyukjinkwon.hcatalog/hive-hcatalog-core

/**
 * Is this a retriable error.
 * @return is it retriable
 */
public boolean isRetriable() {
 return errorType.isRetriable();
}
org.apache.hive.hcatalog.commonErrorType

Javadoc

Enum type representing the various errors throws by HCat.

Most used methods

  • getErrorCode
    Gets the error code.
  • appendCauseMessage
    Whether the cause of the exception should be added to the error message.
  • getErrorMessage
    Gets the error message.
  • isRetriable
    Checks if this is a retriable error.
  • equals
  • getProperty
  • toString

Popular in Java

  • Running tasks concurrently on multiple threads
  • scheduleAtFixedRate (ScheduledExecutorService)
  • setRequestProperty (URLConnection)
  • onRequestPermissionsResult (Fragment)
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • From CI to AI: The AI layer in your organization
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