Package com.asakusafw.bulkloader.cache

Examples of com.asakusafw.bulkloader.cache.LocalCacheInfo


                CacheInfo currentRemoteInfo = map.get(tableInfo.getDfsFilePath());
                Calendar startTimestamp = computeStartTimestamp(currentRemoteInfo, repository, tableName, tableInfo);

                tableInfo.setStartTimestamp(startTimestamp);
                LocalCacheInfo nextLocalInfo = new LocalCacheInfo(
                        cacheId,
                        null,
                        startTimestamp,
                        tableName,
                        tableInfo.getDfsFilePath());
View Full Code Here


                    "Inconsistent model version: expected {0}, but was {1}",
                    model.__tgc__DataModelVersion(), remoteInfo.getModelClassVersion()));
            return null;
        }

        LocalCacheInfo local = repository.getCacheInfo(remoteInfo.getId());
        if (local == null) {
            LOG.info("TG-IMPORTER-11008", tableName, cacheId);
            return null;
        }


        Calendar timestamp = remoteInfo.getTimestamp();
        Calendar localTimestamp = local.getLocalTimestamp();
        if (localTimestamp == null || timestamp.compareTo(localTimestamp) > 0) {
            LOG.warn("TG-IMPORTER-11010", tableName, cacheId, MessageFormat.format(
                    "Inconsistent timestamp: expected is <= {0}, but was {1} (local DB was restored from backup?)",
                    format(localTimestamp), format(timestamp)));
            return null;
        }
        Calendar createdTimestamp = local.getRemoteTimestamp();
        if (createdTimestamp != null && timestamp.compareTo(createdTimestamp) < 0) {
            LOG.warn("TG-IMPORTER-11010", tableName, cacheId, MessageFormat.format(
                    "Inconsistent timestamp: expected is >= {0}, but was {1} (remote FS was restored from backup?)",
                    format(createdTimestamp), format(timestamp)));
            return null;
View Full Code Here

        targetTable.put("__TG_TEST1", tb1);

        Connection conn = DBConnection.getConnection();
        try {
            LocalCacheInfoRepository repo = new LocalCacheInfoRepository(conn);
            repo.putCacheInfo(new LocalCacheInfo(
                    tb1.getCacheId(),
                    null,
                    null,
                    "__TG_TEST1",
                    tb1.getDfsFilePath()));
View Full Code Here

        Connection conn = DBConnection.getConnection();
        final Calendar last = offset(-1);
        try {
            LocalCacheInfoRepository repo = new LocalCacheInfoRepository(conn);
            repo.putCacheInfo(new LocalCacheInfo(
                    tb1.getCacheId(),
                    null,
                    last,
                    "__TG_TEST1",
                    tb1.getDfsFilePath()));
View Full Code Here

        targetTable.put("__TG_TEST1", tb1);

        Connection conn = DBConnection.getConnection();
        try {
            LocalCacheInfoRepository repo = new LocalCacheInfoRepository(conn);
            repo.putCacheInfo(new LocalCacheInfo(
                    tb1.getCacheId(),
                    null,
                    null,
                    "__TG_TEST1",
                    tb1.getDfsFilePath()));
View Full Code Here

        targetTable.put("__TG_TEST1", tb1);

        Connection conn = DBConnection.getConnection();
        try {
            LocalCacheInfoRepository repo = new LocalCacheInfoRepository(conn);
            repo.putCacheInfo(new LocalCacheInfo(
                    tb1.getCacheId(),
                    null,
                    offset(-1),
                    "__TG_TEST1",
                    tb1.getDfsFilePath()));
View Full Code Here

        targetTable.put("__TG_TEST1", tb1);

        Connection conn = DBConnection.getConnection();
        try {
            LocalCacheInfoRepository repo = new LocalCacheInfoRepository(conn);
            repo.putCacheInfo(new LocalCacheInfo(
                    tb1.getCacheId(),
                    null,
                    null,
                    "__TG_TEST1",
                    tb1.getDfsFilePath()));
View Full Code Here

        targetTable.put("__TG_TEST1", tb1);

        Connection conn = DBConnection.getConnection();
        try {
            LocalCacheInfoRepository repo = new LocalCacheInfoRepository(conn);
            repo.putCacheInfo(new LocalCacheInfo(
                    tb1.getCacheId(),
                    null,
                    null,
                    "__TG_TEST1",
                    tb1.getDfsFilePath()));
View Full Code Here

        targetTable.put("__TG_TEST1", tb1);

        Connection conn = DBConnection.getConnection();
        try {
            LocalCacheInfoRepository repo = new LocalCacheInfoRepository(conn);
            repo.putCacheInfo(new LocalCacheInfo(
                    tb1.getCacheId(),
                    null,
                    null,
                    "__TG_TEST1",
                    tb1.getDfsFilePath()));
View Full Code Here

TOP

Related Classes of com.asakusafw.bulkloader.cache.LocalCacheInfo

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.