Examples of Descriptor


Examples of org.apache.cassandra.io.sstable.Descriptor

    {
        ColumnFamilyStore cfs = insertKey1Key2();

        for (int version = 1; version <= 2; ++version)
        {
            Descriptor existing = new Descriptor(cfs.directories.getDirectoryForNewSSTables(1), "Keyspace2", "Standard1", version, false);
            Descriptor desc = new Descriptor(Directories.getBackupsDirectory(existing), "Keyspace2", "Standard1", version, false);
            for (Component c : new Component[]{ Component.DATA, Component.PRIMARY_INDEX, Component.FILTER, Component.STATS })
                assertTrue("can not find backedup file:" + desc.filenameFor(c), new File(desc.filenameFor(c)).exists());
        }
    }
View Full Code Here

Examples of org.apache.cassandra.io.sstable.Descriptor

        String[] keys = cmd.getOptionValues(KEY_OPTION);
        String[] excludes = cmd.getOptionValues(EXCLUDEKEY_OPTION);
        String ssTableFileName = new File(cmd.getArgs()[0]).getAbsolutePath();

        DatabaseDescriptor.loadSchemas();
        Descriptor descriptor = Descriptor.fromFilename(ssTableFileName);
        if (Schema.instance.getCFMetaData(descriptor) == null)
        {
            System.err.println(String.format("The provided column family is not part of this cassandra database: keysapce = %s, column family = %s",
                                             descriptor.ksname, descriptor.cfname));
            System.exit(1);
View Full Code Here

Examples of org.apache.cassandra.io.sstable.Descriptor

    /** Translates remote files to local files by creating a local sstable per remote sstable. */
    public static PendingFile getContextMapping(PendingFile remote) throws IOException
    {
        /* Create a local sstable for each remote sstable */
        Descriptor remotedesc = remote.desc;
        if (!remotedesc.isStreamCompatible())
            throw new UnsupportedOperationException(String.format("SSTable %s is not compatible with current version %s",
                                                                  remote.getFilename(), Descriptor.Version.CURRENT));

        // new local sstable
        Table table = Table.open(remotedesc.ksname);
        ColumnFamilyStore cfStore = table.getColumnFamilyStore(remotedesc.cfname);
        Directories.DataDirectory localDir = Directories.getLocationCapableOfSize(remote.size);
        if (localDir == null)
            throw new RuntimeException("Insufficient disk space to store " + remote.size + " bytes");
        Descriptor localdesc = Descriptor.fromFilename(cfStore.getTempSSTablePath(cfStore.directories.getLocationForDisk(localDir.location)));

        return new PendingFile(localdesc, remote);
    }
View Full Code Here

Examples of org.apache.commons.betwixt.Descriptor

                        if (!getXMLIntrospector().getConfiguration().getPropertySuppressionStrategy()
                                .suppressProperty(
                                        beanClass,
                                        descriptor.getPropertyType(),
                                        descriptor.getName())) {
                          Descriptor nodeDescriptor =
                              getXMLIntrospector().createXMLDescriptor(new BeanProperty(descriptor));
                          if ( nodeDescriptor != null ) {
                              addDescriptor( nodeDescriptor );
                          }
                        }
View Full Code Here

Examples of org.apache.felix.service.command.Descriptor

        if ((methods != null) && (methods.size() > 0))
        {
            for (Method m : methods)
            {
                Descriptor d = m.getAnnotation(Descriptor.class);
                if (d == null)
                {
                    System.out.println("\n" + m.getName());
                }
                else
                {
                    System.out.println("\n" + m.getName() + " - " + d.value());
                }

                System.out.println("   scope: " + name.substring(0, name.indexOf(':')));

                // Get flags and options.
                Class[] paramTypes = m.getParameterTypes();
                Map<String, Parameter> flags = new TreeMap();
                Map<String, String> flagDescs = new TreeMap();
                Map<String, Parameter> options = new TreeMap();
                Map<String, String> optionDescs = new TreeMap();
                List<String> params = new ArrayList();
                Annotation[][] anns = m.getParameterAnnotations();
                for (int paramIdx = 0; paramIdx < anns.length; paramIdx++)
                {
                    Parameter p = findAnnotation(anns[paramIdx], Parameter.class);
                    d = findAnnotation(anns[paramIdx], Descriptor.class);
                    if (p != null)
                    {
                        if (p.presentValue().equals(Parameter.UNSPECIFIED))
                        {
                            options.put(p.names()[0], p);
                            if (d != null)
                            {
                                optionDescs.put(p.names()[0], d.value());
                            }
                        }
                        else
                        {
                            flags.put(p.names()[0], p);
                            if (d != null)
                            {
                                flagDescs.put(p.names()[0], d.value());
                            }
                        }
                    }
                    else if (d != null)
                    {
                        params.add(paramTypes[paramIdx].getSimpleName());
                        params.add(d.value());
                    }
                    else
                    {
                        params.add(paramTypes[paramIdx].getSimpleName());
                        params.add("");
View Full Code Here

Examples of org.apache.servicemix.jbi.deployer.descriptor.Descriptor

                // Check if there is an already existing installer
                // This is certainly the case when a bundle has been stopped and is restarted.
                installer = installers.get(bundle);
                if (installer == null) {
                    URL url = bundle.getResource(DescriptorFactory.DESCRIPTOR_FILE);
                    Descriptor descriptor = DescriptorFactory.buildDescriptor(url);
                    DescriptorFactory.checkDescriptor(descriptor);
                    if (descriptor.getSharedLibrary() != null) {
                        LOGGER.info("Deploying bundle '" + OsgiStringUtils.nullSafeNameAndSymName(bundle) + "' as a JBI shared library");
                        installer = new SharedLibraryInstaller(this, descriptor, null, true);
                    } else if (descriptor.getComponent() != null) {
                        LOGGER.info("Deploying bundle '" + OsgiStringUtils.nullSafeNameAndSymName(bundle) + "' as a JBI component");
                        installer = new ComponentInstaller(this, descriptor, null, true);
                    } else if (descriptor.getServiceAssembly() != null) {
                        LOGGER.info("Deploying bundle '" + OsgiStringUtils.nullSafeNameAndSymName(bundle) + "' as a JBI service assembly");
                        installer = new ServiceAssemblyInstaller(this, descriptor, (File) null, true);
                    } else {
                        throw new IllegalStateException("Unrecognized JBI descriptor: " + url);
                    }
View Full Code Here

Examples of org.apache.servicemix.jbi.deployment.Descriptor

        }

        // Check that the jbi descriptor is present
        try {
            URL url = DeploymentUtil.createJarURL(module, "META-INF/jbi.xml");
            Descriptor descriptor = DescriptorFactory.buildDescriptor(url);
            if (descriptor == null) {
                return null;
            }
            DescriptorFactory.checkDescriptor(descriptor);
           
View Full Code Here

Examples of org.apache.uima.adapter.vinci.util.Descriptor

    UIMAFramework.getLogger().log(Level.FINEST,
            "VinciBinaryAnalysisEngineService_impl: constructor");
    // Instantiate an object which holds configuration data: resource
    // specifier path,
    // serializer class, service name, etc
    descriptor = new Descriptor(serviceConfigPath);
    String aResourceSpecifierPath = descriptor.getResourceSpecifierPath();
    UIMAFramework.getLogger().log(Level.FINE, "Resource Specifier Path::" + aResourceSpecifierPath);

    ResourceSpecifier resourceSpecifier = UIMAFramework.getXMLParser().parseResourceSpecifier(
            new XMLInputSource(aResourceSpecifierPath));
View Full Code Here

Examples of org.dykman.dexter.descriptor.Descriptor

        if(docel.hasAttribute(nsspec))  docel.removeAttribute(nsspec);
      }
    }
    // convert dexter attributes
    scanDocument(document);
    Descriptor descriptor = marshall(document);

    XSLTDocSequencer sequencer = new XSLTDocSequencer(
        this,builder,filename, encoding);
    sequencer.setDexterNamespaces(dexterNamespaces);
    sequencer.setIdNames(idNames);
View Full Code Here

Examples of org.eclipse.jetty.webapp.Descriptor

                else
                {
                    //A web.xml declared the env-entry. Check to see if any injections have been
                    //declared for it. If it was declared in web.xml then don't merge any injections.
                    //If it was declared in a web-fragment, then we can keep merging fragments.
                    Descriptor d = context.getMetaData().getOriginDescriptor("env-entry."+name+".injection");
                    if (d==null || d instanceof FragmentDescriptor)
                        addInjections(context, descriptor, node, name, TypeUtil.fromName(type));
                }
                break;
            }
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.