Search in sources :

Example 1 with Statement

use of herddb.model.Statement in project herddb by diennea.

the class TableManager method scanWithStream.

private DataScanner scanWithStream(ScanStatement statement, StatementEvaluationContext context, Transaction transaction, boolean lockRequired, boolean forWrite) throws StatementExecutionException {
    final TupleComparator comparator = statement.getComparator();
    boolean sorted = comparator != null;
    boolean sortedByClusteredIndex = comparator != null && comparator.isOnlyPrimaryKeyAndAscending() && keyToPage.isSortedAscending();
    final Projection projection = statement.getProjection();
    final boolean applyProjectionDuringScan = projection != null && !sorted;
    ScanLimits limits = statement.getLimits();
    int maxRows = limits == null ? 0 : limits.computeMaxRows(context);
    int offset = limits == null ? 0 : limits.computeOffset(context);
    Stream<DataAccessor> result;
    Function<Record, DataAccessor> mapper = (Record record) -> {
        DataAccessor tuple;
        if (applyProjectionDuringScan) {
            tuple = projection.map(record.getDataAccessor(table), context);
        } else {
            tuple = record.getDataAccessor(table);
        }
        return tuple;
    };
    Stream<DataAccessor> fromTransactionSorted = streamTransactionData(transaction, statement.getPredicate(), context).map(mapper);
    if (comparator != null) {
        fromTransactionSorted = fromTransactionSorted.sorted(comparator);
    }
    Stream<DataAccessor> tableData = streamTableData(statement, context, transaction, lockRequired, forWrite).map(mapper);
    if (maxRows > 0) {
        if (sortedByClusteredIndex) {
            // already sorted from index
            tableData = tableData.limit(maxRows + offset);
            // already sorted if needed
            fromTransactionSorted = fromTransactionSorted.limit(maxRows + offset);
            // we need to re-sort
            result = Stream.concat(fromTransactionSorted, tableData).sorted(comparator);
        } else if (sorted) {
            // need to sort
            tableData = tableData.sorted(comparator);
            tableData = tableData.limit(maxRows + offset);
            // already sorted if needed
            fromTransactionSorted = fromTransactionSorted.limit(maxRows + offset);
            // we need to re-sort
            result = Stream.concat(fromTransactionSorted, tableData).sorted(comparator);
        } else {
            result = Stream.concat(fromTransactionSorted, tableData);
        }
    } else {
        if (sortedByClusteredIndex) {
            // already sorted from index
            tableData = tableData.sorted(comparator);
            // fromTransactionSorted is already sorted
            // we need to re-sort
            result = Stream.concat(fromTransactionSorted, tableData).sorted(comparator);
        } else if (sorted) {
            // tableData already sorted from index
            // fromTransactionSorted is already sorted
            // we need to re-sort
            result = Stream.concat(fromTransactionSorted, tableData).sorted(comparator);
        } else {
            // no need to sort
            result = Stream.concat(fromTransactionSorted, tableData);
        }
    }
    if (offset > 0) {
        result = result.skip(offset);
    }
    if (maxRows > 0) {
        result = result.limit(maxRows);
    }
    if (!applyProjectionDuringScan && projection != null) {
        result = result.map(r -> projection.map(r, context));
    }
    String[] fieldNames;
    Column[] columns;
    if (projection != null) {
        fieldNames = projection.getFieldNames();
        columns = projection.getColumns();
    } else {
        fieldNames = table.columnNames;
        columns = table.columns;
    }
    return new StreamDataScanner(transaction != null ? transaction.transactionId : 0, fieldNames, columns, result);
}
Also used : UpdateStatement(herddb.model.commands.UpdateStatement) Table(herddb.model.Table) TruncateTableStatement(herddb.model.commands.TruncateTableStatement) TupleComparator(herddb.model.TupleComparator) DuplicatePrimaryKeyException(herddb.model.DuplicatePrimaryKeyException) TableStatus(herddb.storage.TableStatus) ServerConfiguration(herddb.server.ServerConfiguration) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Map(java.util.Map) RecordTooBigException(herddb.model.RecordTooBigException) DMLStatementExecutionResult(herddb.model.DMLStatementExecutionResult) LocalLockManager(herddb.utils.LocalLockManager) DataStorageManagerException(herddb.storage.DataStorageManagerException) Index(herddb.model.Index) DataAccessor(herddb.utils.DataAccessor) LogNotAvailableException(herddb.log.LogNotAvailableException) InsertStatement(herddb.model.commands.InsertStatement) DataScanner(herddb.model.DataScanner) CommitLogResult(herddb.log.CommitLogResult) DDLException(herddb.model.DDLException) RecordFunction(herddb.model.RecordFunction) StatementExecutionException(herddb.model.StatementExecutionException) TableContext(herddb.model.TableContext) Collection(java.util.Collection) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) Set(java.util.Set) LogSequenceNumber(herddb.log.LogSequenceNumber) Logger(java.util.logging.Logger) Collectors(java.util.stream.Collectors) RecordSerializer(herddb.codec.RecordSerializer) DataPageMetaData(herddb.core.PageSet.DataPageMetaData) ScanStatement(herddb.model.commands.ScanStatement) List(java.util.List) Stream(java.util.stream.Stream) FullTableScanConsumer(herddb.storage.FullTableScanConsumer) GetStatement(herddb.model.commands.GetStatement) Entry(java.util.Map.Entry) Statement(herddb.model.Statement) Bytes(herddb.utils.Bytes) LongAdder(java.util.concurrent.atomic.LongAdder) Holder(herddb.utils.Holder) LockHandle(herddb.utils.LockHandle) LogEntry(herddb.log.LogEntry) GetResult(herddb.model.GetResult) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) HashMap(java.util.HashMap) PrimaryIndexSeek(herddb.index.PrimaryIndexSeek) Function(java.util.function.Function) ArrayList(java.util.ArrayList) ConcurrentMap(java.util.concurrent.ConcurrentMap) Level(java.util.logging.Level) BatchOrderedExecutor(herddb.utils.BatchOrderedExecutor) Transaction(herddb.model.Transaction) ThreadLocalRandom(java.util.concurrent.ThreadLocalRandom) Projection(herddb.model.Projection) EnsureLongIncrementAccumulator(herddb.utils.EnsureLongIncrementAccumulator) LogEntryType(herddb.log.LogEntryType) ScanLimits(herddb.model.ScanLimits) DeleteStatement(herddb.model.commands.DeleteStatement) Iterator(java.util.Iterator) ReentrantLock(java.util.concurrent.locks.ReentrantLock) Record(herddb.model.Record) Semaphore(java.util.concurrent.Semaphore) DataPageDoesNotExistException(herddb.storage.DataPageDoesNotExistException) LogEntryFactory(herddb.log.LogEntryFactory) StatementExecutionResult(herddb.model.StatementExecutionResult) KeyToPageIndex(herddb.index.KeyToPageIndex) DataStorageManager(herddb.storage.DataStorageManager) ColumnTypes(herddb.model.ColumnTypes) TimeUnit(java.util.concurrent.TimeUnit) Consumer(java.util.function.Consumer) AtomicLong(java.util.concurrent.atomic.AtomicLong) Lock(java.util.concurrent.locks.Lock) CommitLog(herddb.log.CommitLog) IndexOperation(herddb.index.IndexOperation) Predicate(herddb.model.Predicate) Column(herddb.model.Column) StatementEvaluationContext(herddb.model.StatementEvaluationContext) Comparator(java.util.Comparator) Collections(java.util.Collections) SECONDS(java.util.concurrent.TimeUnit.SECONDS) StampedLock(java.util.concurrent.locks.StampedLock) TableManagerStats(herddb.core.stats.TableManagerStats) SystemProperties(herddb.utils.SystemProperties) ScanLimits(herddb.model.ScanLimits) DataAccessor(herddb.utils.DataAccessor) Projection(herddb.model.Projection) TupleComparator(herddb.model.TupleComparator) Column(herddb.model.Column) Record(herddb.model.Record)

Example 2 with Statement

use of herddb.model.Statement in project herddb by diennea.

the class TableManager method streamTableData.

private Stream<Record> streamTableData(ScanStatement statement, StatementEvaluationContext context, Transaction transaction, boolean lockRequired, boolean forWrite) throws StatementExecutionException {
    statement.validateContext(context);
    Predicate predicate = statement.getPredicate();
    boolean acquireLock = transaction != null || forWrite || lockRequired;
    LocalScanPageCache lastPageRead = acquireLock ? null : new LocalScanPageCache();
    IndexOperation indexOperation = predicate != null ? predicate.getIndexOperation() : null;
    boolean primaryIndexSeek = indexOperation instanceof PrimaryIndexSeek;
    AbstractIndexManager useIndex = getIndexForTbleAccess(indexOperation);
    Stream<Map.Entry<Bytes, Long>> scanner = keyToPage.scanner(indexOperation, context, tableContext, useIndex);
    Stream<Record> resultFromTable = scanner.map(entry -> {
        return accessRecord(entry, predicate, context, transaction, lastPageRead, primaryIndexSeek, forWrite, acquireLock);
    }).filter(r -> r != null);
    return resultFromTable;
}
Also used : UpdateStatement(herddb.model.commands.UpdateStatement) Table(herddb.model.Table) TruncateTableStatement(herddb.model.commands.TruncateTableStatement) TupleComparator(herddb.model.TupleComparator) DuplicatePrimaryKeyException(herddb.model.DuplicatePrimaryKeyException) TableStatus(herddb.storage.TableStatus) ServerConfiguration(herddb.server.ServerConfiguration) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Map(java.util.Map) RecordTooBigException(herddb.model.RecordTooBigException) DMLStatementExecutionResult(herddb.model.DMLStatementExecutionResult) LocalLockManager(herddb.utils.LocalLockManager) DataStorageManagerException(herddb.storage.DataStorageManagerException) Index(herddb.model.Index) DataAccessor(herddb.utils.DataAccessor) LogNotAvailableException(herddb.log.LogNotAvailableException) InsertStatement(herddb.model.commands.InsertStatement) DataScanner(herddb.model.DataScanner) CommitLogResult(herddb.log.CommitLogResult) DDLException(herddb.model.DDLException) RecordFunction(herddb.model.RecordFunction) StatementExecutionException(herddb.model.StatementExecutionException) TableContext(herddb.model.TableContext) Collection(java.util.Collection) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) Set(java.util.Set) LogSequenceNumber(herddb.log.LogSequenceNumber) Logger(java.util.logging.Logger) Collectors(java.util.stream.Collectors) RecordSerializer(herddb.codec.RecordSerializer) DataPageMetaData(herddb.core.PageSet.DataPageMetaData) ScanStatement(herddb.model.commands.ScanStatement) List(java.util.List) Stream(java.util.stream.Stream) FullTableScanConsumer(herddb.storage.FullTableScanConsumer) GetStatement(herddb.model.commands.GetStatement) Entry(java.util.Map.Entry) Statement(herddb.model.Statement) Bytes(herddb.utils.Bytes) LongAdder(java.util.concurrent.atomic.LongAdder) Holder(herddb.utils.Holder) LockHandle(herddb.utils.LockHandle) LogEntry(herddb.log.LogEntry) GetResult(herddb.model.GetResult) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) HashMap(java.util.HashMap) PrimaryIndexSeek(herddb.index.PrimaryIndexSeek) Function(java.util.function.Function) ArrayList(java.util.ArrayList) ConcurrentMap(java.util.concurrent.ConcurrentMap) Level(java.util.logging.Level) BatchOrderedExecutor(herddb.utils.BatchOrderedExecutor) Transaction(herddb.model.Transaction) ThreadLocalRandom(java.util.concurrent.ThreadLocalRandom) Projection(herddb.model.Projection) EnsureLongIncrementAccumulator(herddb.utils.EnsureLongIncrementAccumulator) LogEntryType(herddb.log.LogEntryType) ScanLimits(herddb.model.ScanLimits) DeleteStatement(herddb.model.commands.DeleteStatement) Iterator(java.util.Iterator) ReentrantLock(java.util.concurrent.locks.ReentrantLock) Record(herddb.model.Record) Semaphore(java.util.concurrent.Semaphore) DataPageDoesNotExistException(herddb.storage.DataPageDoesNotExistException) LogEntryFactory(herddb.log.LogEntryFactory) StatementExecutionResult(herddb.model.StatementExecutionResult) KeyToPageIndex(herddb.index.KeyToPageIndex) DataStorageManager(herddb.storage.DataStorageManager) ColumnTypes(herddb.model.ColumnTypes) TimeUnit(java.util.concurrent.TimeUnit) Consumer(java.util.function.Consumer) AtomicLong(java.util.concurrent.atomic.AtomicLong) Lock(java.util.concurrent.locks.Lock) CommitLog(herddb.log.CommitLog) IndexOperation(herddb.index.IndexOperation) Predicate(herddb.model.Predicate) Column(herddb.model.Column) StatementEvaluationContext(herddb.model.StatementEvaluationContext) Comparator(java.util.Comparator) Collections(java.util.Collections) SECONDS(java.util.concurrent.TimeUnit.SECONDS) StampedLock(java.util.concurrent.locks.StampedLock) TableManagerStats(herddb.core.stats.TableManagerStats) SystemProperties(herddb.utils.SystemProperties) IndexOperation(herddb.index.IndexOperation) PrimaryIndexSeek(herddb.index.PrimaryIndexSeek) Entry(java.util.Map.Entry) LogEntry(herddb.log.LogEntry) Record(herddb.model.Record) Predicate(herddb.model.Predicate)

Example 3 with Statement

use of herddb.model.Statement in project herddb by diennea.

the class ServerSideConnectionPeer method handleExecuteStatement.

private void handleExecuteStatement(Message message, Channel _channel) {
    Long tx = (Long) message.parameters.get("tx");
    long txId = tx != null ? tx : TransactionContext.NOTRANSACTION_ID;
    String query = (String) message.parameters.get("query");
    String tableSpace = (String) message.parameters.get("tableSpace");
    Boolean returnValues = (Boolean) message.parameters.get("returnValues");
    if (returnValues == null) {
        returnValues = Boolean.FALSE;
    }
    List<Object> parameters = (List<Object>) message.parameters.get("params");
    if (LOGGER.isLoggable(Level.FINEST)) {
        LOGGER.log(Level.FINEST, "query " + query + " with " + parameters);
    }
    try {
        TransactionContext transactionContext = new TransactionContext(txId);
        TranslatedQuery translatedQuery = server.getManager().getPlanner().translate(tableSpace, query, parameters, false, true, returnValues, -1);
        Statement statement = translatedQuery.plan.mainStatement;
        // LOGGER.log(Level.SEVERE, "query " + query + ", " + parameters + ", plan: " + translatedQuery.plan);
        StatementExecutionResult result = server.getManager().executePlan(translatedQuery.plan, translatedQuery.context, transactionContext);
        // LOGGER.log(Level.SEVERE, "query " + query + ", " + parameters + ", result:" + result);
        if (result instanceof DMLStatementExecutionResult) {
            DMLStatementExecutionResult dml = (DMLStatementExecutionResult) result;
            Map<String, Object> otherData = null;
            if (returnValues && dml.getKey() != null) {
                TableAwareStatement tableStatement = statement.unwrap(TableAwareStatement.class);
                Table table = server.getManager().getTableSpaceManager(statement.getTableSpace()).getTableManager(tableStatement.getTable()).getTable();
                otherData = new HashMap<>();
                Object key = RecordSerializer.deserializePrimaryKey(dml.getKey().data, table);
                otherData.put("key", key);
                if (dml.getNewvalue() != null) {
                    Map<String, Object> newvalue = RecordSerializer.toBean(new Record(dml.getKey(), dml.getNewvalue()), table);
                    otherData.put("newvalue", newvalue);
                }
            }
            _channel.sendReplyMessage(message, Message.EXECUTE_STATEMENT_RESULT(dml.getUpdateCount(), otherData, dml.transactionId));
        } else if (result instanceof GetResult) {
            GetResult get = (GetResult) result;
            if (!get.found()) {
                _channel.sendReplyMessage(message, Message.EXECUTE_STATEMENT_RESULT(0, null, get.transactionId));
            } else {
                Map<String, Object> record = get.getRecord().toBean(get.getTable());
                _channel.sendReplyMessage(message, Message.EXECUTE_STATEMENT_RESULT(1, record, get.transactionId));
            }
        } else if (result instanceof TransactionResult) {
            TransactionResult txresult = (TransactionResult) result;
            Map<String, Object> data = new HashMap<>();
            Set<Long> transactionsForTableSpace = openTransactions.computeIfAbsent(statement.getTableSpace(), k -> new ConcurrentSkipListSet<>());
            switch(txresult.getOutcome()) {
                case BEGIN:
                    {
                        transactionsForTableSpace.add(txresult.getTransactionId());
                        break;
                    }
                case COMMIT:
                case ROLLBACK:
                    transactionsForTableSpace.remove(txresult.getTransactionId());
                    break;
            }
            data.put("tx", txresult.getTransactionId());
            _channel.sendReplyMessage(message, Message.EXECUTE_STATEMENT_RESULT(1, data, txresult.transactionId));
        } else if (result instanceof DDLStatementExecutionResult) {
            DDLStatementExecutionResult ddl = (DDLStatementExecutionResult) result;
            _channel.sendReplyMessage(message, Message.EXECUTE_STATEMENT_RESULT(1, null, ddl.transactionId));
        } else {
            _channel.sendReplyMessage(message, Message.ERROR(null, new Exception("unknown result type " + result.getClass() + " (" + result + ")")));
        }
    } catch (DuplicatePrimaryKeyException err) {
        LOGGER.log(Level.SEVERE, "error on query " + query + ", parameters: " + parameters + ": err", err);
        Message error = Message.ERROR(null, err);
        _channel.sendReplyMessage(message, error);
    } catch (NotLeaderException err) {
        Message error = Message.ERROR(null, err);
        error.setParameter("notLeader", "true");
        _channel.sendReplyMessage(message, error);
    } catch (StatementExecutionException err) {
        Message error = Message.ERROR(null, err);
        _channel.sendReplyMessage(message, error);
    } catch (RuntimeException err) {
        LOGGER.log(Level.SEVERE, "unexpected error on query " + query + ", parameters: " + parameters + ": err", err);
        Message error = Message.ERROR(null, err);
        _channel.sendReplyMessage(message, error);
    }
}
Also used : NotLeaderException(herddb.model.NotLeaderException) Message(herddb.network.Message) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) HashMap(java.util.HashMap) StatementExecutionException(herddb.model.StatementExecutionException) DDLStatementExecutionResult(herddb.model.DDLStatementExecutionResult) DMLStatementExecutionResult(herddb.model.DMLStatementExecutionResult) StatementExecutionResult(herddb.model.StatementExecutionResult) DuplicatePrimaryKeyException(herddb.model.DuplicatePrimaryKeyException) List(java.util.List) TuplesList(herddb.utils.TuplesList) ArrayList(java.util.ArrayList) Record(herddb.model.Record) TransactionResult(herddb.model.TransactionResult) TranslatedQuery(herddb.sql.TranslatedQuery) Table(herddb.model.Table) GetResult(herddb.model.GetResult) RollbackTransactionStatement(herddb.model.commands.RollbackTransactionStatement) TableAwareStatement(herddb.model.TableAwareStatement) ScanStatement(herddb.model.commands.ScanStatement) Statement(herddb.model.Statement) SQLPlannedOperationStatement(herddb.model.commands.SQLPlannedOperationStatement) DDLStatementExecutionResult(herddb.model.DDLStatementExecutionResult) TableAwareStatement(herddb.model.TableAwareStatement) DuplicatePrimaryKeyException(herddb.model.DuplicatePrimaryKeyException) HerdDBInternalException(herddb.core.HerdDBInternalException) StatementExecutionException(herddb.model.StatementExecutionException) NotLeaderException(herddb.model.NotLeaderException) DataScannerException(herddb.model.DataScannerException) DMLStatementExecutionResult(herddb.model.DMLStatementExecutionResult) TransactionContext(herddb.model.TransactionContext) AtomicLong(java.util.concurrent.atomic.AtomicLong) Map(java.util.Map) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) HashMap(java.util.HashMap) ConcurrentMap(java.util.concurrent.ConcurrentMap)

Example 4 with Statement

use of herddb.model.Statement in project herddb by diennea.

the class ServerSideConnectionPeer method handleExecuteStatements.

private void handleExecuteStatements(Message message, Channel _channel) {
    Long tx = (Long) message.parameters.get("tx");
    long txId = tx != null ? tx : TransactionContext.NOTRANSACTION_ID;
    long transactionId = txId;
    String query = (String) message.parameters.get("query");
    String tableSpace = (String) message.parameters.get("tableSpace");
    Boolean returnValues = (Boolean) message.parameters.get("returnValues");
    if (returnValues == null) {
        returnValues = Boolean.FALSE;
    }
    List<List<Object>> batch = (List<List<Object>>) message.parameters.get("params");
    try {
        List<Long> updateCounts = new ArrayList<>(batch.size());
        List<Map<String, Object>> otherDatas = new ArrayList<>(batch.size());
        for (int i = 0; i < batch.size(); i++) {
            List<Object> parameters = batch.get(i);
            TransactionContext transactionContext = new TransactionContext(transactionId);
            TranslatedQuery translatedQuery = server.getManager().getPlanner().translate(tableSpace, query, parameters, false, true, returnValues, -1);
            Statement statement = translatedQuery.plan.mainStatement;
            StatementExecutionResult result = server.getManager().executePlan(translatedQuery.plan, translatedQuery.context, transactionContext);
            if (transactionId > 0 && result.transactionId > 0 && transactionId != result.transactionId) {
                throw new StatementExecutionException("transactionid changed during batch execution, " + transactionId + "<>" + result.transactionId);
            }
            transactionId = result.transactionId;
            if (result instanceof DMLStatementExecutionResult) {
                DMLStatementExecutionResult dml = (DMLStatementExecutionResult) result;
                Map<String, Object> otherData = Collections.emptyMap();
                if (returnValues && dml.getKey() != null) {
                    TableAwareStatement tableStatement = (TableAwareStatement) statement;
                    Table table = server.getManager().getTableSpaceManager(statement.getTableSpace()).getTableManager(tableStatement.getTable()).getTable();
                    Object key = RecordSerializer.deserializePrimaryKey(dml.getKey().data, table);
                    otherData = new HashMap<>();
                    otherData.put("key", key);
                    if (dml.getNewvalue() != null) {
                        Map<String, Object> newvalue = RecordSerializer.toBean(new Record(dml.getKey(), dml.getNewvalue()), table);
                        otherData.put("newvalue", newvalue);
                    }
                }
                updateCounts.add(Long.valueOf(dml.getUpdateCount()));
                otherDatas.add(otherData);
            } else {
                _channel.sendReplyMessage(message, Message.ERROR(null, new Exception("bad result type " + result.getClass() + " (" + result + ")")));
            }
        }
        _channel.sendReplyMessage(message, Message.EXECUTE_STATEMENT_RESULTS(updateCounts, otherDatas, transactionId));
    } catch (HerdDBInternalException err) {
        Message error = Message.ERROR(null, err);
        if (err instanceof NotLeaderException) {
            error.setParameter("notLeader", "true");
        }
        _channel.sendReplyMessage(message, error);
    }
}
Also used : NotLeaderException(herddb.model.NotLeaderException) HerdDBInternalException(herddb.core.HerdDBInternalException) Message(herddb.network.Message) ArrayList(java.util.ArrayList) StatementExecutionException(herddb.model.StatementExecutionException) DDLStatementExecutionResult(herddb.model.DDLStatementExecutionResult) DMLStatementExecutionResult(herddb.model.DMLStatementExecutionResult) StatementExecutionResult(herddb.model.StatementExecutionResult) List(java.util.List) TuplesList(herddb.utils.TuplesList) ArrayList(java.util.ArrayList) Record(herddb.model.Record) TranslatedQuery(herddb.sql.TranslatedQuery) Table(herddb.model.Table) RollbackTransactionStatement(herddb.model.commands.RollbackTransactionStatement) TableAwareStatement(herddb.model.TableAwareStatement) ScanStatement(herddb.model.commands.ScanStatement) Statement(herddb.model.Statement) SQLPlannedOperationStatement(herddb.model.commands.SQLPlannedOperationStatement) TableAwareStatement(herddb.model.TableAwareStatement) DuplicatePrimaryKeyException(herddb.model.DuplicatePrimaryKeyException) HerdDBInternalException(herddb.core.HerdDBInternalException) StatementExecutionException(herddb.model.StatementExecutionException) NotLeaderException(herddb.model.NotLeaderException) DataScannerException(herddb.model.DataScannerException) DMLStatementExecutionResult(herddb.model.DMLStatementExecutionResult) TransactionContext(herddb.model.TransactionContext) AtomicLong(java.util.concurrent.atomic.AtomicLong) Map(java.util.Map) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) HashMap(java.util.HashMap) ConcurrentMap(java.util.concurrent.ConcurrentMap)

Aggregations

DMLStatementExecutionResult (herddb.model.DMLStatementExecutionResult)4 DuplicatePrimaryKeyException (herddb.model.DuplicatePrimaryKeyException)4 Record (herddb.model.Record)4 Statement (herddb.model.Statement)4 StatementExecutionException (herddb.model.StatementExecutionException)4 StatementExecutionResult (herddb.model.StatementExecutionResult)4 Table (herddb.model.Table)4 ScanStatement (herddb.model.commands.ScanStatement)4 GetResult (herddb.model.GetResult)3 RecordSerializer (herddb.codec.RecordSerializer)2 HerdDBInternalException (herddb.core.HerdDBInternalException)2 DataPageMetaData (herddb.core.PageSet.DataPageMetaData)2 TableManagerStats (herddb.core.stats.TableManagerStats)2 IndexOperation (herddb.index.IndexOperation)2 KeyToPageIndex (herddb.index.KeyToPageIndex)2 PrimaryIndexSeek (herddb.index.PrimaryIndexSeek)2 CommitLog (herddb.log.CommitLog)2 CommitLogResult (herddb.log.CommitLogResult)2 LogEntry (herddb.log.LogEntry)2 LogEntryFactory (herddb.log.LogEntryFactory)2