当前位置: 首页>>代码示例>>Java>>正文


Java EEException类代码示例

本文整理汇总了Java中org.voltdb.exceptions.EEException的典型用法代码示例。如果您正苦于以下问题:Java EEException类的具体用法?Java EEException怎么用?Java EEException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


EEException类属于org.voltdb.exceptions包,在下文中一共展示了EEException类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: serializeTable

import org.voltdb.exceptions.EEException; //导入依赖的package包/类
@Override
public VoltTable serializeTable(final int tableId) throws EEException {
    if (LOG.isTraceEnabled()) {
        LOG.trace("Retrieving VoltTable:" + tableId);
    }
    deserializer.clear();
    final int errorCode = nativeSerializeTable(this.pointer, tableId, deserializer.buffer(),
            deserializer.buffer().capacity());
    checkErrorCode(errorCode);

    try {
        return deserializer.readObject(VoltTable.class);
    } catch (final IOException ex) {
        LOG.error("Failed to retrieve table:" + tableId + ex);
        throw new EEException(ERRORCODE_WRONG_SERIALIZED_BYTES);
    }
}
 
开发者ID:s-store,项目名称:s-store,代码行数:18,代码来源:ExecutionEngineJNI.java

示例2: antiCacheEvictBlock

import org.voltdb.exceptions.EEException; //导入依赖的package包/类
@Override
public VoltTable antiCacheEvictBlock(Table catalog_tbl, long block_size, int num_blocks) {
    if (m_anticache == false) {
        String msg = "Trying to invoke anti-caching operation but feature is not enabled";
        throw new VoltProcedure.VoltAbortException(msg);
    }
    deserializer.clear();
    
    final int numResults = nativeAntiCacheEvictBlock(this.pointer, catalog_tbl.getRelativeIndex(), block_size, num_blocks);
    if (numResults == -1) {
        throwExceptionForError(ERRORCODE_ERROR);
    }
    try {
        deserializer.readInt();//Ignore the length of the result tables
        final VoltTable results[] = new VoltTable[numResults];
        for (int ii = 0; ii < numResults; ii++) {
            final VoltTable resultTable = PrivateVoltTableFactory.createUninitializedVoltTable();
            results[ii] = (VoltTable)deserializer.readObject(resultTable, this);
        }
        return results[0];
    } catch (final IOException ex) {
        LOG.error("Failed to deserialze result table for antiCacheEvictBlock" + ex);
        throw new EEException(ERRORCODE_WRONG_SERIALIZED_BYTES);
    }
}
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:26,代码来源:ExecutionEngineJNI.java

示例3: executeQueryPlanFragmentsAndGetResults

import org.voltdb.exceptions.EEException; //导入依赖的package包/类
/** Run multiple query plan fragments */
public VoltTable[] executeQueryPlanFragmentsAndGetResults(long[] planFragmentIds,
                                                                   int numFragmentIds,
                                                                   int[] input_depIds,
                                                                   int[] output_depIds,
                                                                   ParameterSet[] parameterSets,
                                                                   int numParameterSets,
                                                                   long txnId, long lastCommittedTxnId,
                                                                   long undoQuantumToken) throws EEException {
    DependencySet dset = this.executeQueryPlanFragmentsAndGetDependencySet(
            planFragmentIds, numFragmentIds,
            input_depIds,
            output_depIds,
            parameterSets, numParameterSets, txnId, lastCommittedTxnId, undoQuantumToken);
    assert(dset != null);
    return (dset.dependencies);
}
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:18,代码来源:ExecutionEngine.java

示例4: release

import org.voltdb.exceptions.EEException; //导入依赖的package包/类
/**
 * Releases the Engine object.
 * This method is automatically called from #finalize(), but
 * it's recommended to call this method just after you finish
 * using the object.
 * @see #nativeDestroy(long)
 */
@Override
public void release() throws EEException {
    if (trace.val) LOG.trace("Releasing Execution Engine... " + pointer);
    if (this.pointer != 0L) {
        final int errorCode = nativeDestroy(this.pointer);
        pointer = 0L;
        checkErrorCode(errorCode);
    }
    deserializer = null;
    deserializerBufferOrigin.discard();
    exceptionBuffer = null;
    exceptionBufferOrigin.discard();
    ariesLogBuffer = null;
    ariesLogBufferOrigin.discard();

    if (trace.val) LOG.trace("Released Execution Engine.");
}
 
开发者ID:s-store,项目名称:s-store,代码行数:25,代码来源:ExecutionEngineJNI.java

示例5: loadCatalog

import org.voltdb.exceptions.EEException; //导入依赖的package包/类
/** write the catalog as a UTF-8 byte string via connection */
@Override
public void loadCatalog(final String serializedCatalog) throws EEException {
    int result = ExecutionEngine.ERRORCODE_ERROR;
    m_data.clear();

    try {
        final byte catalogBytes[] = serializedCatalog.getBytes("UTF-8");
        if (m_data.capacity() < catalogBytes.length + 100) {
            m_data = ByteBuffer.allocate(catalogBytes.length + 100);
        }
        m_data.putInt(Commands.LoadCatalog.m_id);
        m_data.put(catalogBytes);
        m_data.put((byte)'\0');
    } catch (final UnsupportedEncodingException ex) {
        Logger.getLogger(ExecutionEngineIPC.class.getName()).log(
                Level.SEVERE, null, ex);
    }

    try {
        m_data.flip();
        m_connection.write();
        result = m_connection.readStatusByte();
    } catch (final IOException e) {
        System.out.println("Exception: " + e.getMessage());
        throw new RuntimeException(e);
    }
    checkErrorCode(result);
}
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:30,代码来源:ExecutionEngineIPC.java

示例6: updateCatalog

import org.voltdb.exceptions.EEException; //导入依赖的package包/类
/** write the diffs as a UTF-8 byte string via connection */
@Override
public void updateCatalog(final String catalogDiffs, int catalogVersion) throws EEException {
    int result = ExecutionEngine.ERRORCODE_ERROR;
    m_data.clear();

    try {
        final byte catalogBytes[] = catalogDiffs.getBytes("UTF-8");
        if (m_data.capacity() < catalogBytes.length + 100) {
            m_data = ByteBuffer.allocate(catalogBytes.length + 100);
        }
        m_data.putInt(Commands.UpdateCatalog.m_id);
        m_data.putInt(catalogVersion);
        m_data.put(catalogBytes);
        m_data.put((byte)'\0');
    } catch (final UnsupportedEncodingException ex) {
        Logger.getLogger(ExecutionEngineIPC.class.getName()).log(
                Level.SEVERE, null, ex);
    }

    try {
        m_data.flip();
        m_connection.write();
        result = m_connection.readStatusByte();
    } catch (final IOException e) {
        System.out.println("Exception: " + e.getMessage());
        throw new RuntimeException(e);
    }
    checkErrorCode(result);
}
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:31,代码来源:ExecutionEngineIPC.java

示例7: executeQueryPlanFragmentsAndGetDependencySet

import org.voltdb.exceptions.EEException; //导入依赖的package包/类
@Override
public DependencySet executeQueryPlanFragmentsAndGetDependencySet(
        long[] planFragmentIds,
        int numFragmentIds,
        int[] input_depIds,
        int[] output_depIds,
        ParameterSet[] parameterSets,
        int numParameterSets,
        long txnId, long lastCommittedTxnId, long undoToken) throws EEException {
    
    // TODO
    return (null);
}
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:14,代码来源:ExecutionEngineIPC.java

示例8: trackingWriteSet

import org.voltdb.exceptions.EEException; //导入依赖的package包/类
@Override
    public VoltTable trackingWriteSet(Long txnId) throws EEException {
        if (debug.val)
            LOG.debug(String.format("Get WRITE tracking set for txn #%d at partition %d",
                      txnId, this.executor.getPartitionId()));
        
        // Always check our cache first
        VoltTable cache[] = this.trackingGetCacheEntry(txnId);
        if (cache[1] != null) return (cache[1]);
        
        deserializer.clear();
        final int errorCode = nativeTrackingWriteSet(this.pointer, txnId.longValue());
        if (errorCode == ERRORCODE_NO_DATA) {
//            if (debug.val)
                LOG.warn(String.format("No WRITE tracking set for txn #%d at partition %d",
                         txnId, this.executor.getPartitionId()));
            return (null);
        } else checkErrorCode(errorCode);
        
        try {
            deserializer.readInt();//Ignore the length of the result tables
            final VoltTable resultTable = PrivateVoltTableFactory.createUninitializedVoltTable();
            cache[1] = (VoltTable)deserializer.readObject(resultTable, this);
            return (cache[1]);
        } catch (final IOException ex) {
            LOG.error("Failed to deserialze result table for getStats" + ex);
            throw new EEException(ERRORCODE_WRONG_SERIALIZED_BYTES);
        }
    }
 
开发者ID:s-store,项目名称:s-store,代码行数:30,代码来源:ExecutionEngineJNI.java

示例9: antiCacheInitialize

import org.voltdb.exceptions.EEException; //导入依赖的package包/类
@Override
public void antiCacheInitialize(File dbDir, long blockSize) throws EEException {
    assert(m_anticache == false);
    
    // TODO: Switch to LOG.debug
    LOG.info("Initializing anti-cache feature at partition " + this.executor.getPartitionId());
    LOG.info(String.format("Partition #%d AntiCache Directory: %s",
             this.executor.getPartitionId(), dbDir.getAbsolutePath()));
    final int errorCode = nativeAntiCacheInitialize(this.pointer, dbDir.getAbsolutePath(), blockSize);
    checkErrorCode(errorCode);
    m_anticache = true;
}
 
开发者ID:s-store,项目名称:s-store,代码行数:13,代码来源:ExecutionEngineJNI.java

示例10: executeCustomPlanFragment

import org.voltdb.exceptions.EEException; //导入依赖的package包/类
@Override
public VoltTable executeCustomPlanFragment(final String plan, int outputDepId,
        int inputDepId, final long txnId, final long lastCommittedTxnId, final long undoQuantumToken)
        throws EEException {
    // TODO Auto-generated method stub
    return null;
}
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:8,代码来源:MockExecutionEngine.java

示例11: executeQueryPlanFragmentsAndGetResults

import org.voltdb.exceptions.EEException; //导入依赖的package包/类
@Override
public VoltTable[] executeQueryPlanFragmentsAndGetResults(final long[] planFragmentIds, final int numFragmentIds,
        final int[] input_depIds,
        final int[] output_depIds,
        final ParameterSet[] parameterSets,
        final int numParameterSets, final long txnId, final long lastCommittedTxnId, final long undoToken) throws EEException {
    // TODO Auto-generated method stub
    return null;
}
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:10,代码来源:MockExecutionEngine.java

示例12: loadTable

import org.voltdb.exceptions.EEException; //导入依赖的package包/类
@Override
public void loadTable(final int tableId, final VoltTable table, final long txnId,
    final long lastCommittedTxnId, final long undoToken, final boolean allowExport)
throws EEException
{
    // TODO Auto-generated method stub
}
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:8,代码来源:MockExecutionEngine.java

示例13: executeQueryPlanFragmentsAndGetDependencySet

import org.voltdb.exceptions.EEException; //导入依赖的package包/类
/** Run multiple query plan fragments */
abstract public DependencySet executeQueryPlanFragmentsAndGetDependencySet(long[] planFragmentIds,
                                                                   int numFragmentIds,
                                                                   int[] input_depIds,
                                                                   int[] output_depIds,
                                                                   ParameterSet[] parameterSets,
                                                                   int numParameterSets,
                                                                   long txnId, long lastCommittedTxnId,
                                                                   long undoQuantumToken) throws EEException;
 
开发者ID:s-store,项目名称:s-store,代码行数:10,代码来源:ExecutionEngine.java

示例14: trackingEnable

import org.voltdb.exceptions.EEException; //导入依赖的package包/类
@Override
public void trackingEnable(Long txnId) throws EEException {
    if (debug.val)
        LOG.debug(String.format("Enabling read/write set tracking for txn #%d at partition %d",
                  txnId, this.executor.getPartitionId()));
    final int errorCode = nativeTrackingEnable(this.pointer, txnId.longValue());
    checkErrorCode(errorCode);
}
 
开发者ID:s-store,项目名称:s-store,代码行数:9,代码来源:ExecutionEngineJNI.java

示例15: executeCustomPlanFragment

import org.voltdb.exceptions.EEException; //导入依赖的package包/类
@Override
public VoltTable executeCustomPlanFragment(final String plan, final int outputDepId,
        final int inputDepId, final long txnId, final long lastCommittedTxnId,
        final long undoQuantumToken) throws EEException
{
    if (this.trackingCache != null) {
        this.trackingResetCacheEntry(txnId);
    }
    
    fsForParameterSet.clear();
    deserializer.clear();
    //C++ JSON deserializer is not thread safe, must synchronize
    int errorCode = 0;
    synchronized (ExecutionEngineJNI.class) {
        errorCode = nativeExecuteCustomPlanFragment(this.pointer, plan, outputDepId, inputDepId,
                                                    txnId, lastCommittedTxnId, undoQuantumToken);
    }
    checkErrorCode(errorCode);

    try {
        deserializer.readInt(); // total size of the data
        // check if anything was changed
        final boolean dirty = deserializer.readBoolean();
        if (dirty)
            m_dirty = true;
        final int numDependencies = deserializer.readInt();
        assert(numDependencies == 1);
        final VoltTable dependencies[] = new VoltTable[numDependencies];
        for (int i = 0; i < numDependencies; ++i) {
            /*int depId =*/ deserializer.readInt();
            dependencies[i] = deserializer.readObject(VoltTable.class);
        }
        return dependencies[0];
    } catch (final IOException ex) {
        LOG.error("Failed to deserialze result dependencies" + ex);
        throw new EEException(ERRORCODE_WRONG_SERIALIZED_BYTES);
    }
}
 
开发者ID:s-store,项目名称:s-store,代码行数:39,代码来源:ExecutionEngineJNI.java


注:本文中的org.voltdb.exceptions.EEException类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。