Package com.yahoo.omid.tso

Examples of com.yahoo.omid.tso.TSOState


     */
    private static final long BKREADBATCHSIZE = 50;
    private static final int PARALLEL_READS = 4;

    public static TSOState getState(TSOServerConfig config){
        TSOState returnValue;
        if(!config.isRecoveryEnabled()){
            LOG.warn("Logger is disabled");
            returnValue = new TSOState(new TimestampOracle());
            returnValue.initialize();
        } else {
            BookKeeperStateBuilder builder = new BookKeeperStateBuilder(config);
           
            try{
                returnValue = builder.buildState();
View Full Code Here


        public void processResult(int rc, String path, Object ctx, byte[] data, Stat stat){
            if(rc == Code.OK){
                buildStateFromLedger(data, ctx);
            } else if (rc == KeeperException.Code.NONODE.intValue()) {
                LOG.warn("No node exists. " + KeeperException.Code.get(rc).toString());
                TSOState tempState;
                try{
                    tempState = new TSOState(timestampOracle);
                } catch (Exception e) {
                    LOG.error("Error while creating state logger.", e);
                    tempState = null;
                }
                ((BookKeeperStateBuilder.Context) ctx).setState(tempState);                                               
View Full Code Here

     */
    private static final long BKREADBATCHSIZE = 50; //是bk read batch size
    private static final int PARALLEL_READS = 4;

    public static TSOState getState(TSOServerConfig config) {
        TSOState returnValue;
        if (!config.isRecoveryEnabled()) {
            LOG.warn("Logger is disabled");
            returnValue = new TSOState(new TimestampOracle());
            returnValue.initialize();
        } else { //加-ha参数时config.isRecoveryEnabled为true,这样会把事务日志记到bookkeeper
            BookKeeperStateBuilder builder = new BookKeeperStateBuilder(config);

            try {
                returnValue = builder.buildState();
View Full Code Here

        public void processResult(int rc, String path, Object ctx, byte[] data, Stat stat) {
            if (rc == Code.OK) {
                buildStateFromLedger(data, ctx);
            } else if (rc == KeeperException.Code.NONODE.intValue()) {
                LOG.warn("No node exists. " + KeeperException.Code.get(rc).toString());
                TSOState tempState;
                try {
                    tempState = new TSOState(timestampOracle);
                } catch (Exception e) {
                    LOG.error("Error while creating state logger.", e);
                    tempState = null;
                }
                ((BookKeeperStateBuilder.Context) ctx).setState(tempState);
View Full Code Here

TOP

Related Classes of com.yahoo.omid.tso.TSOState

Copyright © 2018 www.massapicom. 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.