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

How to use
NoSuchTxnException
in
org.apache.hadoop.hive.metastore.api

Best Java code snippets using org.apache.hadoop.hive.metastore.api.NoSuchTxnException (Showing top 20 results out of 315)

origin: apache/hive

public NoSuchTxnException deepCopy() {
 return new NoSuchTxnException(this);
}
origin: apache/hive

public Object getFieldValue(_Fields field) {
 switch (field) {
 case MESSAGE:
  return getMessage();
 }
 throw new IllegalStateException();
}
origin: apache/hive

@Override
public boolean equals(Object that) {
 if (that == null)
  return false;
 if (that instanceof NoSuchTxnException)
  return this.equals((NoSuchTxnException)that);
 return false;
}
origin: apache/hive

public void setFieldValue(_Fields field, Object value) {
 switch (field) {
 case MESSAGE:
  if (value == null) {
   unsetMessage();
  } else {
   setMessage((String)value);
  }
  break;
 }
}
origin: apache/hive

public void read(org.apache.thrift.protocol.TProtocol iprot, NoSuchTxnException struct) throws org.apache.thrift.TException {
 org.apache.thrift.protocol.TField schemeField;
 iprot.readStructBegin();
 while (true)
 {
  schemeField = iprot.readFieldBegin();
  if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
   break;
  }
  switch (schemeField.id) {
   case 1: // MESSAGE
    if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
     struct.message = iprot.readString();
     struct.setMessageIsSet(true);
    } else { 
     org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
    }
    break;
   default:
    org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
  }
  iprot.readFieldEnd();
 }
 iprot.readStructEnd();
 struct.validate();
}
origin: apache/hive

/**
 * Performs a deep copy on <i>other</i>.
 */
public NoSuchTxnException(NoSuchTxnException other) {
 if (other.isSetMessage()) {
  this.message = other.message;
 }
}
origin: apache/hive

private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
 try {
  read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
 } catch (org.apache.thrift.TException te) {
  throw new java.io.IOException(te);
 }
}
origin: apache/hive

 @Override
 public void read(org.apache.thrift.protocol.TProtocol prot, NoSuchTxnException struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(1);
  if (incoming.get(0)) {
   struct.message = iprot.readString();
   struct.setMessageIsSet(true);
  }
 }
}
origin: apache/hive

private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
 try {
  write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
 } catch (org.apache.thrift.TException te) {
  throw new java.io.IOException(te);
 }
}
origin: apache/hive

public void write(org.apache.thrift.protocol.TProtocol oprot, NoSuchTxnException struct) throws org.apache.thrift.TException {
 struct.validate();
 oprot.writeStructBegin(STRUCT_DESC);
 if (struct.message != null) {
  oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
  oprot.writeString(struct.message);
  oprot.writeFieldEnd();
 }
 oprot.writeFieldStop();
 oprot.writeStructEnd();
}
origin: apache/hive

public boolean equals(NoSuchTxnException that) {
 if (that == null)
  return false;
 boolean this_present_message = true && this.isSetMessage();
 boolean that_present_message = true && that.isSetMessage();
 if (this_present_message || that_present_message) {
  if (!(this_present_message && that_present_message))
   return false;
  if (!this.message.equals(that.message))
   return false;
 }
 return true;
}
origin: org.spark-project.hive/hive-metastore

public void setFieldValue(_Fields field, Object value) {
 switch (field) {
 case MESSAGE:
  if (value == null) {
   unsetMessage();
  } else {
   setMessage((String)value);
  }
  break;
 }
}
origin: org.apache.hive/hive-standalone-metastore

public void read(org.apache.thrift.protocol.TProtocol iprot, NoSuchTxnException struct) throws org.apache.thrift.TException {
 org.apache.thrift.protocol.TField schemeField;
 iprot.readStructBegin();
 while (true)
 {
  schemeField = iprot.readFieldBegin();
  if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
   break;
  }
  switch (schemeField.id) {
   case 1: // MESSAGE
    if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
     struct.message = iprot.readString();
     struct.setMessageIsSet(true);
    } else { 
     org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
    }
    break;
   default:
    org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
  }
  iprot.readFieldEnd();
 }
 iprot.readStructEnd();
 struct.validate();
}
origin: org.apache.hive/hive-standalone-metastore

private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
 try {
  read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
 } catch (org.apache.thrift.TException te) {
  throw new java.io.IOException(te);
 }
}
origin: org.spark-project.hive/hive-metastore

 @Override
 public void read(org.apache.thrift.protocol.TProtocol prot, NoSuchTxnException struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(1);
  if (incoming.get(0)) {
   struct.message = iprot.readString();
   struct.setMessageIsSet(true);
  }
 }
}
origin: com.facebook.presto.hive/hive-apache

private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
 try {
  write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
 } catch (org.apache.thrift.TException te) {
  throw new java.io.IOException(te);
 }
}
origin: org.spark-project.hive/hive-metastore

public void write(org.apache.thrift.protocol.TProtocol oprot, NoSuchTxnException struct) throws org.apache.thrift.TException {
 struct.validate();
 oprot.writeStructBegin(STRUCT_DESC);
 if (struct.message != null) {
  oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
  oprot.writeString(struct.message);
  oprot.writeFieldEnd();
 }
 oprot.writeFieldStop();
 oprot.writeStructEnd();
}
origin: apache/hive

private void heartbeatTxn(Connection dbConn, long txnid)
 throws NoSuchTxnException, TxnAbortedException, SQLException, MetaException {
 // If the txnid is 0, then there are no transactions in this heartbeat
 if (txnid == 0) return;
 Statement stmt = null;
 try {
  stmt = dbConn.createStatement();
  long now = getDbTime(dbConn);
  String s = "update TXNS set txn_last_heartbeat = " + now +
   " where txn_id = " + txnid + " and txn_state = '" + TXN_OPEN + "'";
  LOG.debug("Going to execute update <" + s + ">");
  int rc = stmt.executeUpdate(s);
  if (rc < 1) {
   ensureValidTxn(dbConn, txnid, stmt); // This should now throw some useful exception.
   LOG.warn("Can neither heartbeat txn nor confirm it as invalid.");
   dbConn.rollback();
   throw new NoSuchTxnException("No such txn: " + txnid);
  }
  LOG.debug("Going to commit");
  dbConn.commit();
 } finally {
  closeStmt(stmt);
 }
}
origin: apache/hive

/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
 if (field == null) {
  throw new IllegalArgumentException();
 }
 switch (field) {
 case MESSAGE:
  return isSetMessage();
 }
 throw new IllegalStateException();
}
origin: org.apache.hive/hive-standalone-metastore

public void setFieldValue(_Fields field, Object value) {
 switch (field) {
 case MESSAGE:
  if (value == null) {
   unsetMessage();
  } else {
   setMessage((String)value);
  }
  break;
 }
}
org.apache.hadoop.hive.metastore.apiNoSuchTxnException

Most used methods

  • <init>
    Performs a deep copy on other.
  • getMessage
  • equals
  • isSetMessage
    Returns true if field message is set (has been assigned a value) and false otherwise
  • read
  • setMessage
  • setMessageIsSet
  • unsetMessage
  • validate
  • write

Popular in Java

  • Reading from database using SQL prepared statement
  • setScale (BigDecimal)
  • runOnUiThread (Activity)
  • startActivity (Activity)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Path (java.nio.file)
  • 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
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Top 17 Free Sublime Text Plugins
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