Package org.apache.falcon.entity

Examples of org.apache.falcon.entity.CatalogStorage


                propagateFileSystemCopyProperties(pathsWithPartitions, props);
            } else if (sourceStorage.getType() == Storage.TYPE.TABLE) {
                instancePaths = "${coord:dataIn('input')}";

                final CatalogStorage sourceTableStorage = (CatalogStorage) sourceStorage;
                propagateTableStorageProperties(srcCluster, sourceTableStorage, props, "falconSource");
                final CatalogStorage targetTableStorage = (CatalogStorage) targetStorage;
                propagateTableStorageProperties(trgCluster, targetTableStorage, props, "falconTarget");
                propagateTableCopyProperties(srcCluster, sourceTableStorage,
                    trgCluster, targetTableStorage, props);
                setupHiveConfiguration(srcCluster, trgCluster, wfPath);
            }
View Full Code Here


        }
    }

    private String getTableFeedInstanceName(Feed feed, String feedInstancePath,
                                            Storage.TYPE storageType) throws URISyntaxException {
        CatalogStorage instanceStorage = (CatalogStorage) FeedHelper.createStorage(
                storageType.name(), feedInstancePath);
        return feed.getName() + "/" + instanceStorage.toPartitionAsPath();
    }
View Full Code Here

     * @throws FalconException
     */
    private long getTablePartitionCreateTimeMetric(String feedUriTemplate)
        throws IOException, URISyntaxException, FalconException {

        CatalogStorage storage = (CatalogStorage)
                FeedHelper.createStorage(Storage.TYPE.TABLE.name(), feedUriTemplate);
        CatalogPartition partition = CatalogServiceFactory.getCatalogService().getPartition(
                storage.getCatalogUrl(), storage.getDatabase(), storage.getTable(), storage.getPartitions());
        return partition == null ? 0 : partition.getCreateTime();
    }
View Full Code Here

        Storage storage = FeedHelper.createStorage(cluster, feed);
        if (storage.getType() == Storage.TYPE.FILESYSTEM) {  // FS does NOT use staging dirs
            return;
        }

        final CatalogStorage tableStorage = (CatalogStorage) storage;
        String stagingDir = FeedHelper.getStagingDir(cluster, feed, tableStorage, Tag.REPLICATION);
        //stagingDir/dataOutPartitionValue/nominal-time/clusterName/data
        Path stagingPath = new Path(stagingDir + "/*/*/*/*");
        FileSystem fs = getFileSystem(cluster);
        try {
View Full Code Here

        final InputStream inputStream = getClass().getResourceAsStream("/config/feed/hive-table-feed.xml");
        Feed tableFeed = (Feed) EntityType.FEED.getUnmarshaller().unmarshal(inputStream);
        getStore().publish(EntityType.FEED, tableFeed);

        final Cluster srcCluster = dfsCluster.getCluster();
        final CatalogStorage sourceStorage = (CatalogStorage) FeedHelper.createStorage(srcCluster, tableFeed);
        String sourceStagingDir = FeedHelper.getStagingDir(srcCluster, tableFeed, sourceStorage, Tag.REPLICATION);

        sourceStagingPath1 = new Path(sourceStagingDir + "/ds=2012092400/" + System.currentTimeMillis());
        sourceStagingPath2 = new Path(sourceStagingDir + "/ds=2012092500/" + System.currentTimeMillis());

        final Cluster targetCluster = targetDfsCluster.getCluster();
        final CatalogStorage targetStorage = (CatalogStorage) FeedHelper.createStorage(targetCluster, tableFeed);
        String targetStagingDir = FeedHelper.getStagingDir(targetCluster, tableFeed, targetStorage, Tag.REPLICATION);

        targetStagingPath1 = new Path(targetStagingDir + "/ds=2012092400/" + System.currentTimeMillis());
        targetStagingPath2 = new Path(targetStagingDir + "/ds=2012092500/" + System.currentTimeMillis());
    }
View Full Code Here

TOP

Related Classes of org.apache.falcon.entity.CatalogStorage

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.