Examples of Storage


Examples of org.apache.falcon.entity.Storage

            return;
        }

        for (Output output : process.getOutputs().getOutputs()) {
            Feed feed = EntityUtil.getEntity(EntityType.FEED, output.getFeed());
            Storage storage = FeedHelper.createStorage(cluster, feed);

            if (storage.getType() == Storage.TYPE.FILESYSTEM) {
                final String outputName = output.getName()// no prefix for backwards compatibility
                paramList.add(outputName + "=${" + outputName + "}");
            } else if (storage.getType() == Storage.TYPE.TABLE) {
                Map<String, String> props = new HashMap<String, String>();
                propagateCatalogTableProperties(output, (CatalogStorage) storage, props); // prefix is auto added
                for (String key : props.keySet()) {
                    paramList.add(key + "=${wf:conf('" + key + "')}");
                }
View Full Code Here

Examples of org.apache.falcon.entity.Storage

                    EntityUtil.getEntity(EntityType.CLUSTER, cluster.getName());
            if (!EntityUtil.responsibleFor(clusterEntity.getColo())) {
                continue;
            }

            final Storage storage = FeedHelper.createStorage(cluster, feed);
            // this is only true for table, filesystem always returns true
            if (storage.getType() == Storage.TYPE.FILESYSTEM) {
                continue;
            }

            CatalogStorage catalogStorage = (CatalogStorage) storage;
            String metaStorePrincipal = ClusterHelper.getPropertyValue(clusterEntity,
View Full Code Here

Examples of org.apache.falcon.entity.Storage

        LOG.info("Applying retention on " + feedPattern + " type: " + retentionType
                + ", Limit: " + retentionLimit + ", timezone: " + timeZone
                + ", frequency: " + frequency + ", storage" + feedStorageType);

        Storage storage = FeedHelper.createStorage(feedStorageType, feedPattern);
        evict(storage, retentionLimit, timeZone);

        logInstancePaths(new Path(logFile));

        int len = buffer.length();
View Full Code Here

Examples of org.apache.falcon.entity.Storage

        return feed.getName() + "/" + instanceStorage.toPartitionAsPath();
    }

    private String getFileSystemFeedInstanceName(String feedInstancePath, Feed feed,
                                                 Cluster cluster) throws FalconException {
        Storage rawStorage = FeedHelper.createStorage(cluster, feed);
        String feedPathTemplate = rawStorage.getUriTemplate(LocationType.DATA);
        String instance = feedInstancePath;

        String[] elements = FeedDataPath.PATTERN.split(feedPathTemplate);
        for (String element : elements) {
            instance = instance.replaceFirst(element, "");
View Full Code Here

Examples of org.apache.falcon.entity.Storage

     * @param retention retention limit
     * @throws FalconException
     */
    private void deleteStagedData(Cluster cluster, Feed feed, long retention)
        throws FalconException {
        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);
View Full Code Here

Examples of org.apache.falcon.entity.Storage

            if (!StringUtils.equals(oldFeed.getAvailabilityFlag(), newFeed.getAvailabilityFlag())) {
                LOG.debug(oldFeed.toShortString() + ": Availability flag has changed. Updating...");
                return true;
            }

            Storage oldFeedStorage = FeedHelper.createStorage(cluster, oldFeed);
            Storage newFeedStorage = FeedHelper.createStorage(cluster, newFeed);

            if (!oldFeedStorage.isIdentical(newFeedStorage)) {
                LOG.debug(oldFeed.toShortString() + ": Storage has changed. Updating...");
                return true;
            }
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.common.Storage

   *
   * @return the created version file
   */
  public static File[] createNameNodeVersionFile(Configuration conf,
      File[] parent, StorageInfo version, String bpid) throws IOException {
    Storage storage = new NNStorage(conf,
                              Collections.<URI>emptyList(),
                              Collections.<URI>emptyList());
    storage.setStorageInfo(version);
    File[] versionFiles = new File[parent.length];
    for (int i = 0; i < parent.length; i++) {
      versionFiles[i] = new File(parent[i], "VERSION");
      StorageDirectory sd = new StorageDirectory(parent[i].getParentFile());
      storage.writeProperties(versionFiles[i], sd);
    }
    return versionFiles;
  }
View Full Code Here

Examples of org.apache.james.mime4j.storage.Storage

     */
    private static BodyPart createImagePart(StorageBodyFactory bodyFactory,
            BufferedImage image) throws IOException {
        // Create a binary message body from the image
        StorageProvider storageProvider = bodyFactory.getStorageProvider();
        Storage storage = storeImage(storageProvider, image, "png");
        BinaryBody body = bodyFactory.binaryBody(storage);

        // Create a body part with the correct MIME-type and transfer encoding
        BodyPart bodyPart = new BodyPart();
        bodyPart.setBody(body, "image/png");
View Full Code Here

Examples of org.apache.lucene.gdata.storage.Storage

     * Test method for
     * 'org.apache.lucene.gdata.storage.db4o.DB4oStorage.storeEntry(ServerBaseEntry)'
     */
    @SuppressWarnings("unchecked")
    public void testStoreEntry() throws StorageException {
        Storage storage = this.controller.getStorage();
        try {
            ServerBaseEntry e = createServerBaseEntry();
            storage.storeEntry(e);
            fail("excption exp. for feed for the entry");
        } catch (StorageException e) {
            //
        }

        try {

            storage.storeEntry(null);
            fail("entry is null");
        } catch (StorageException e) {
            //
        }
        ServerBaseEntry exEntry = new ServerBaseEntry();
        exEntry.setFeedId("some");
        try {

            storage.storeEntry(exEntry);
            fail("entry id is null");
        } catch (StorageException e) {
            //
        }
        exEntry.setId("someID");
        exEntry.setFeedId(null);
        try {

            storage.storeEntry(exEntry);
            fail("feed id is null");
        } catch (StorageException e) {
            //
        }

        storeServerBaseFeed();
        ServerBaseEntry e = createServerBaseEntry();
        storage.storeEntry(e);
        ServerBaseEntry e1 = createServerBaseEntry();
        storage.storeEntry(e1);

        storage = this.controller.getStorage();
        Query query = getContainer().query();
        query.constrain(BaseEntry.class);
        query.descend("id").constrain(e.getId());
        ObjectSet resultSet = query.execute();
        assertEquals(1, resultSet.size());
        BaseEntry storedEntry = (BaseEntry) resultSet.next();
        assertEquals("1", storedEntry.getVersionId());

        ServerBaseFeed bFeed = new ServerBaseFeed();
        bFeed.setItemsPerPage(25);
        bFeed.setId(FEEDID);
        bFeed.setStartIndex(1);
        bFeed.setServiceType(SERVICENAME);
        BaseFeed<BaseFeed, BaseEntry> feed = storage.getFeed(bFeed);
        assertEquals(2, feed.getEntries().size());
        assertEquals(e.getId(), feed.getEntries().get(1).getId()); // last post
        // ->
        // previously
        // created
View Full Code Here

Examples of org.apache.servicemix.jbi.deployer.impl.Storage

        listener.exchangeSent(exchange);
    }

    private ServiceAssemblyImpl createServiceAssembly() {
        ServiceAssemblyDesc descriptor = DescriptorFactory.buildDescriptor(DescriptorFactory.class.getResource("serviceAssembly.xml")).getServiceAssembly();
        final Storage storage = createMock(Storage.class);
        expect(storage.get("state", State.Shutdown.name())).andReturn(State.Shutdown.name()).anyTimes();
        replay(storage);
        final Component component = createMock(Component.class);
        replay(component);

        ComponentImpl comp = new ComponentImpl(null, null, component, storage, false, null);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.