Tabnine Logo
AbortTxnRequest
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: apache/hive

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

@Override
public void abort_txn(AbortTxnRequest rqst) throws TException {
 getTxnHandler().abortTxn(rqst);
 if (listeners != null && !listeners.isEmpty()) {
  MetaStoreListenerNotifier.notifyEvent(listeners, EventType.ABORT_TXN,
      new AbortTxnEvent(rqst.getTxnid(), this));
 }
}
origin: apache/hive

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

public void setFieldValue(_Fields field, Object value) {
 switch (field) {
 case TXNID:
  if (value == null) {
   unsetTxnid();
  } else {
   setTxnid((Long)value);
  }
  break;
 case REPL_POLICY:
  if (value == null) {
   unsetReplPolicy();
  } else {
   setReplPolicy((String)value);
  }
  break;
 }
}
origin: apache/hive

public Object getFieldValue(_Fields field) {
 switch (field) {
 case TXNID:
  return getTxnid();
 case REPL_POLICY:
  return getReplPolicy();
 }
 throw new IllegalStateException();
}
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 TXNID:
  return isSetTxnid();
 case REPL_POLICY:
  return isSetReplPolicy();
 }
 throw new IllegalStateException();
}
origin: apache/hive

@Override
public void replRollbackTxn(long srcTxnId, String replPolicy) throws NoSuchTxnException, TException {
 AbortTxnRequest rqst = new AbortTxnRequest(srcTxnId);
 rqst.setReplPolicy(replPolicy);
 client.abort_txn(rqst);
}
origin: apache/hive

public void validate() throws org.apache.thrift.TException {
 // check for required fields
 if (!isSetTxnid()) {
  throw new org.apache.thrift.protocol.TProtocolException("Required field 'txnid' is unset! Struct:" + toString());
 }
 // check for sub-struct validity
}
origin: apache/hive

@Override
@RetrySemantics.Idempotent
public void abortTxn(AbortTxnRequest rqst) throws NoSuchTxnException, MetaException, TxnAbortedException {
 long txnid = rqst.getTxnid();
 long sourceTxnId = -1;
 try {
   stmt = dbConn.createStatement();
   if (rqst.isSetReplPolicy()) {
    sourceTxnId = rqst.getTxnid();
    List<Long> targetTxnIds = getTargetTxnIdList(rqst.getReplPolicy(),
        Collections.singletonList(sourceTxnId), dbConn);
    if (targetTxnIds.isEmpty()) {
         " and repl policy " + rqst.getReplPolicy());
     return;
    TxnStatus status = findTxnState(txnid,stmt);
    if(status == TxnStatus.ABORTED) {
     if (rqst.isSetReplPolicy()) {
      deleteReplTxnMapEntry(dbConn, sourceTxnId, rqst.getReplPolicy());
   if (rqst.isSetReplPolicy()) {
    deleteReplTxnMapEntry(dbConn, sourceTxnId, rqst.getReplPolicy());
origin: apache/hive

@Override
public void clear() {
 setTxnidIsSet(false);
 this.txnid = 0;
 this.replPolicy = null;
}
origin: org.spark-project.hive/hive-metastore

public void setFieldValue(_Fields field, Object value) {
 switch (field) {
 case TXNID:
  if (value == null) {
   unsetTxnid();
  } else {
   setTxnid((Long)value);
  }
  break;
 }
}
origin: com.facebook.presto.hive/hive-apache

public void read(org.apache.thrift.protocol.TProtocol iprot, AbortTxnRequest 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: // TXNID
    if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
     struct.txnid = iprot.readI64();
     struct.setTxnidIsSet(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

   if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
    struct.txnid = iprot.readI64();
    struct.setTxnidIsSet(true);
   } else { 
    org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
   if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
    struct.replPolicy = iprot.readString();
    struct.setReplPolicyIsSet(true);
   } else { 
    org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
struct.validate();
origin: com.facebook.presto.hive/hive-apache

/** 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 TXNID:
  return isSetTxnid();
 }
 throw new IllegalStateException();
}
origin: apache/hive

private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
 try {
  // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
  __isset_bitfield = 0;
  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, AbortTxnRequest struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  struct.txnid = iprot.readI64();
  struct.setTxnidIsSet(true);
  BitSet incoming = iprot.readBitSet(1);
  if (incoming.get(0)) {
   struct.replPolicy = iprot.readString();
   struct.setReplPolicyIsSet(true);
  }
 }
}
origin: apache/hive

@Override
public void replRollbackTxn(long srcTxnId, String replPolicy) throws NoSuchTxnException, TException {
 AbortTxnRequest rqst = new AbortTxnRequest(srcTxnId);
 rqst.setReplPolicy(replPolicy);
 client.abort_txn(rqst);
}
origin: org.spark-project.hive/hive-metastore

public void validate() throws org.apache.thrift.TException {
 // check for required fields
 if (!isSetTxnid()) {
  throw new org.apache.thrift.protocol.TProtocolException("Required field 'txnid' is unset! Struct:" + toString());
 }
 // check for sub-struct validity
}
origin: apache/hive

public AbortTxnRequest(
 long txnid)
{
 this();
 this.txnid = txnid;
 setTxnidIsSet(true);
}
origin: com.facebook.presto.hive/hive-apache

public void setFieldValue(_Fields field, Object value) {
 switch (field) {
 case TXNID:
  if (value == null) {
   unsetTxnid();
  } else {
   setTxnid((Long)value);
  }
  break;
 }
}
org.apache.hadoop.hive.metastore.apiAbortTxnRequest

Most used methods

  • <init>
    Performs a deep copy on other.
  • getTxnid
  • equals
  • isSetTxnid
    Returns true if field txnid is set (has been assigned a value) and false otherwise
  • read
  • setReplPolicy
  • setTxnid
  • setTxnidIsSet
  • toString
  • unsetTxnid
  • validate
  • write
  • validate,
  • write,
  • getReplPolicy,
  • isSetReplPolicy,
  • setReplPolicyIsSet,
  • unsetReplPolicy

Popular in Java

  • Updating database using SQL prepared statement
  • requestLocationUpdates (LocationManager)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • setRequestProperty (URLConnection)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • Permission (java.security)
    Legacy security code; do not use.
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Best IntelliJ plugins
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