conn.rollback(); } catch (Exception e) { throw new RuntimeException(e);
private static byte[] getRange(PhoenixConnection pconn, List<Object> startValues) throws SQLException { byte[] lowerRange; if (startValues == null) { lowerRange = KeyRange.UNBOUND; } else { String upsertValues = StringUtils.repeat("?,", startValues.size()).substring(0,startValues.size() * 2 - 1); String upsertStmt = "UPSERT INTO T VALUES(" + upsertValues + ")"; PreparedStatement stmt = pconn.prepareStatement(upsertStmt); for (int i = 0; i < startValues.size(); i++) { stmt.setObject(i+1, startValues.get(i)); } stmt.execute(); Cell startCell = PhoenixRuntime.getUncommittedDataIterator(pconn).next().getSecond().get(0); lowerRange = CellUtil.cloneRow(startCell); pconn.rollback(); } return lowerRange; }
metaConnection.rollback(); PColumn column = new PColumnImpl(PNameFactory.newName("COLUMN_QUALIFIER"), PNameFactory.newName(DEFAULT_COLUMN_FAMILY_NAME), PVarbinary.INSTANCE, null, null, true, numColumns, metaConnection.rollback(); metaConnection.getQueryServices().addColumn(tableMetadata, sysCatalogPTable, Collections.<String,List<Pair<String,Object>>>emptyMap(), Collections.<String>emptySet(), Lists.newArrayList(column)); metaConnection.removeTable(null, SYSTEM_CATALOG_NAME, null, timestamp);
public MutationState createFunction(CreateFunctionStatement stmt) throws SQLException { boolean wasAutoCommit = connection.getAutoCommit(); connection.rollback(); try { PFunction function = new PFunction(stmt.getFunctionInfo(), stmt.isTemporary(), stmt.isReplace()); connection.rollback(); functionUpsert.execute(); functionData.addAll(connection.getMutationState().toMutations(null).next().getSecond()); connection.rollback();
private MutationState dropFunction(String functionName, boolean ifExists) throws SQLException { connection.rollback(); boolean wasAutoCommit = connection.getAutoCommit(); try {
public MutationState dropSchema(DropSchemaStatement executableDropSchemaStatement) throws SQLException { connection.rollback(); boolean wasAutoCommit = connection.getAutoCommit(); try {
public MutationState alterIndex(AlterIndexStatement statement) throws SQLException { connection.rollback(); boolean wasAutoCommit = connection.getAutoCommit(); try { connection.rollback(); incrementTableSeqNum(table,statement.getTableType(), 0, metaPropertiesEvaluated); tableMetadata.addAll(connection.getMutationState().toMutations(timeStamp).next().getSecond()); connection.rollback();
public MutationState createSchema(CreateSchemaStatement create) throws SQLException { boolean wasAutoCommit = connection.getAutoCommit(); connection.rollback(); try { if (!SchemaUtil.isNamespaceMappingEnabled(null, schemaUpsert.execute(); schemaMutations = connection.getMutationState().toMutations(null).next().getSecond(); connection.rollback();
state.getEstimatedSize()); upsertRows(conn, fullTableName); conn.rollback(); assertEquals("Mutation state size should be zero after rollback", 0, state.getEstimatedSize());
QueryServices.ALLOW_SPLITTABLE_SYSTEM_CATALOG_ROLLBACK, QueryServicesOptions.DEFAULT_ALLOW_SPLITTABLE_SYSTEM_CATALOG_ROLLBACK); connection.rollback(); try { connection.setAutoCommit(false); connection.rollback(); connection.rollback(); connection.rollback(); pkName, keySeq, saltBucketNum != null); columnMetadata.addAll(connection.getMutationState().toMutations(timestamp).next().getSecond()); connection.rollback(); connection.rollback();
boolean removeTableProps, NamedTableNode namedTableNode, PTableType tableType) throws SQLException { connection.rollback(); boolean wasAutoCommit = connection.getAutoCommit(); List<PColumn> columns = Lists.newArrayListWithExpectedSize(origColumnDefs != null ? origColumnDefs.size() : 0); connection.rollback(); connection.rollback(); connection.rollback(); connection.rollback();
connection.rollback(); boolean wasAutoCommit = connection.getAutoCommit(); PName tenantId = connection.getTenantId();
public MutationState updateStatistics(UpdateStatisticsStatement updateStatisticsStmt) throws SQLException { connection.rollback();
private MutationState dropFunction(String functionName, boolean ifExists) throws SQLException { connection.rollback(); boolean wasAutoCommit = connection.getAutoCommit(); try {
private MutationState dropFunction(String functionName, boolean ifExists) throws SQLException { connection.rollback(); boolean wasAutoCommit = connection.getAutoCommit(); try {
public MutationState dropSchema(DropSchemaStatement executableDropSchemaStatement) throws SQLException { connection.rollback(); boolean wasAutoCommit = connection.getAutoCommit(); try {
public MutationState dropSchema(DropSchemaStatement executableDropSchemaStatement) throws SQLException { connection.rollback(); boolean wasAutoCommit = connection.getAutoCommit(); try {
public MutationState createSchema(CreateSchemaStatement create) throws SQLException { boolean wasAutoCommit = connection.getAutoCommit(); connection.rollback(); try { if (!SchemaUtil.isNamespaceMappingEnabled(null, schemaUpsert.execute(); schemaMutations = connection.getMutationState().toMutations(null).next().getSecond(); connection.rollback();
public MutationState createSchema(CreateSchemaStatement create) throws SQLException { boolean wasAutoCommit = connection.getAutoCommit(); connection.rollback(); try { if (!SchemaUtil.isNamespaceMappingEnabled(null, schemaUpsert.execute(); schemaMutations = connection.getMutationState().toMutations(null).next().getSecond(); connection.rollback();