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

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

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

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

@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
@RetrySemantics.Idempotent
public void abortTxn(AbortTxnRequest rqst) throws NoSuchTxnException, MetaException, TxnAbortedException {
 long txnid = rqst.getTxnid();
 long sourceTxnId = -1;
 try {
    sourceTxnId = rqst.getTxnid();
    List<Long> targetTxnIds = getTargetTxnIdList(rqst.getReplPolicy(),
        Collections.singletonList(sourceTxnId), dbConn);
origin: com.facebook.presto.hive/hive-apache

public Object getFieldValue(_Fields field) {
 switch (field) {
 case TXNID:
  return Long.valueOf(getTxnid());
 }
 throw new IllegalStateException();
}
origin: org.spark-project.hive/hive-metastore

public Object getFieldValue(_Fields field) {
 switch (field) {
 case TXNID:
  return Long.valueOf(getTxnid());
 }
 throw new IllegalStateException();
}
origin: org.apache.hive/hive-standalone-metastore

@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: org.spark-project.hive/hive-metastore

public void abortTxn(AbortTxnRequest rqst) throws NoSuchTxnException, MetaException {
 long txnid = rqst.getTxnid();
 try {
  Connection dbConn = null;
  try {
   dbConn = getDbConn(Connection.TRANSACTION_SERIALIZABLE);
   if (abortTxns(dbConn, Collections.singletonList(txnid)) != 1) {
    LOG.debug("Going to rollback");
    dbConn.rollback();
    throw new NoSuchTxnException("No such transaction: " + txnid);
   }
   LOG.debug("Going to commit");
   dbConn.commit();
  } catch (SQLException e) {
   LOG.debug("Going to rollback");
   rollbackDBConn(dbConn);
   checkRetryable(dbConn, e, "abortTxn(" + rqst + ")");
   throw new MetaException("Unable to update transaction database "
    + StringUtils.stringifyException(e));
  } finally {
   closeDbConn(dbConn);
  }
 } catch (RetryException e) {
  abortTxn(rqst);
 }
}
origin: com.facebook.presto.hive/hive-apache

public void abortTxn(AbortTxnRequest rqst) throws NoSuchTxnException, MetaException {
 long txnid = rqst.getTxnid();
 try {
  Connection dbConn = null;
  try {
   dbConn = getDbConn(Connection.TRANSACTION_SERIALIZABLE);
   if (abortTxns(dbConn, Collections.singletonList(txnid)) != 1) {
    LOG.debug("Going to rollback");
    dbConn.rollback();
    throw new NoSuchTxnException("No such transaction: " + txnid);
   }
   LOG.debug("Going to commit");
   dbConn.commit();
  } catch (SQLException e) {
   LOG.debug("Going to rollback");
   rollbackDBConn(dbConn);
   checkRetryable(dbConn, e, "abortTxn(" + rqst + ")");
   throw new MetaException("Unable to update transaction database "
    + StringUtils.stringifyException(e));
  } finally {
   closeDbConn(dbConn);
  }
 } catch (RetryException e) {
  abortTxn(rqst);
 }
}
org.apache.hadoop.hive.metastore.apiAbortTxnRequestgetTxnid

Popular methods of AbortTxnRequest

  • <init>
    Performs a deep copy on other.
  • 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
  • getReplPolicy
  • write,
  • getReplPolicy,
  • isSetReplPolicy,
  • setReplPolicyIsSet,
  • unsetReplPolicy

Popular in Java

  • Reactive rest calls using spring rest template
  • putExtra (Intent)
  • runOnUiThread (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • JFrame (javax.swing)
  • Top plugins for Android Studio
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