Examples of TransactionFailureException


Examples of co.cask.tephra.TransactionFailureException

        flowlet.initialize(flowletContext);

        LOG.info("Flowlet initialized: " + flowletContext);
      } catch (Throwable t) {
        LOG.error("User code exception. Aborting transaction.", t);
        txContext.abort(new TransactionFailureException("User code exception. Aborting transaction", t));
        throw Throwables.propagate(t);
      }
      txContext.finish();
    } catch (TransactionFailureException e) {
      LOG.error("Flowlet throws exception during flowlet initialize: " + flowletContext, e);
View Full Code Here

Examples of co.cask.tephra.TransactionFailureException

        LOG.info("Destroying flowlet: " + flowletContext);
        flowlet.destroy();
        LOG.info("Flowlet destroyed: " + flowletContext);
      } catch (Throwable t) {
        LOG.error("User code exception. Aborting transaction.", t);
        txContext.abort(new TransactionFailureException("User code exception. Aborting transaction", t));
        // No need to propagate, as it is shutting down.
      }
      txContext.finish();
    } catch (TransactionFailureException e) {
      LOG.error("Flowlet throws exception during flowlet destroy: " + flowletContext, e);
View Full Code Here

Examples of co.cask.tephra.TransactionFailureException

    try {
      if (success) {
        LOG.info("Committing Spark Program transaction: {}", context);
        if (!txClient.commit(transaction)) {
          LOG.warn("Spark Job transaction failed to commit");
          throw new TransactionFailureException("Failed to commit transaction for Spark " + context.toString());
        }
      } else {
        // invalidate the transaction as spark might have written to datasets too
        txClient.invalidate(transaction.getWritePointer());
      }
View Full Code Here

Examples of co.cask.tephra.TransactionFailureException

        // committing long running tx: no need to commit datasets, as they were committed in external processes
        // also no need to rollback changes if commit fails, as these changes where performed by mapreduce tasks
        // NOTE: can't call afterCommit on datasets in this case: the changes were made by external processes.
        if (!txClient.commit(transaction)) {
          LOG.warn("MapReduce Job transaction failed to commit");
          throw new TransactionFailureException("Failed to commit transaction for MapReduce " + context.toString());
        }
      } else {
        // invalids long running tx. All writes done by MR cannot be undone at this point.
        txClient.invalidate(transaction.getWritePointer());
      }
View Full Code Here

Examples of org.neo4j.graphdb.TransactionFailureException

        {
            return transactionManager.getTransaction();
        }
        catch ( SystemException se )
        {
            throw new TransactionFailureException( "Error fetching transaction "
                + "for current thread", se );
        }
    }
View Full Code Here

Examples of org.neo4j.graphdb.TransactionFailureException

            {
                tx.delistResource( con.getXAResource(), XAResource.TMSUCCESS );
            }
            catch ( SystemException e )
            {
                throw new TransactionFailureException(
                    "Failed to delist resource '" + con +
                    "' from current transaction.", e );
            }
        }
    }
View Full Code Here

Examples of org.neo4j.graphdb.TransactionFailureException

            txManager.begin();
            result = new TopLevelTransaction( txManager );
        }
        catch ( Exception e )
        {
            throw new TransactionFailureException(
                "Unable to begin transaction", e );
        }
        return result;
    }
View Full Code Here

Examples of org.neo4j.graphdb.TransactionFailureException

        {
            transactionManager.getTransaction().setRollbackOnly();
        }
        catch ( Exception e )
        {
            throw new TransactionFailureException(
                "Failed to mark transaction as rollback only.", e );
        }
    }
View Full Code Here

Examples of org.neo4j.graphdb.TransactionFailureException

            neoTransaction = (WriteTransaction) getTransaction();
            return neoTransaction;
        }
        catch ( XAException e )
        {
            throw new TransactionFailureException(
                "Unable to get transaction.", e );
        }
    }
View Full Code Here

Examples of org.neo4j.graphdb.TransactionFailureException

            try
            {
                creator.join();
                if ( creator.exception != null )
                {
                    throw new TransactionFailureException( "Index creation failed for " + indexName +
                            ", " + result.first(), creator.exception );
                }
            }
            catch ( InterruptedException e )
            {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.