Examples of Version


Examples of org.apache.accumulo.core.file.rfile.bcfile.Utils.Version

      this.comparator = makeComparator(strComparator);
    }
   
    // ctor for reads
    public TFileMeta(DataInput in) throws IOException {
      version = new Version(in);
      if (!version.compatibleWith(TFile.API_VERSION)) {
        throw new RuntimeException("Incompatible TFile fileVersion.");
      }
      recordCount = Utils.readVLong(in);
      strComparator = Utils.readString(in);
View Full Code Here

Examples of org.apache.accumulo.core.util.Version

    log.info("Instance " + config.getInstance().getInstanceID());
    int dataVersion = Accumulo.getAccumuloPersistentVersion(fs);
    log.info("Data Version " + dataVersion);
    Accumulo.waitForZookeeperAndHdfs(fs);
   
    Version codeVersion = new Version(Constants.VERSION);
    if (dataVersion != Constants.DATA_VERSION && dataVersion != Constants.PREV_DATA_VERSION) {
      throw new RuntimeException("This version of accumulo (" + codeVersion + ") is not compatible with files stored using data version " + dataVersion);
    }
   
    TreeMap<String,String> sortedProps = new TreeMap<String,String>();
View Full Code Here

Examples of org.apache.airavata.common.utils.Version

    @Path(ResourcePathConstants.BasicRegistryConstants.VERSION)
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response getVersion() {
        AiravataRegistry2 airavataRegistry = RegPoolUtils.acquireRegistry(context);
        try {
            Version version = airavataRegistry.getVersion();
            if (version != null) {
                Response.ResponseBuilder builder = Response.status(Response.Status.OK);
                builder.entity(version);
                return builder.build();
            } else {
View Full Code Here

Examples of org.apache.avalon.framework.Version

        super( name );
    }

    public void testValidVersionString()
    {
        final Version v1 = Version.getVersion( "1" );
        assertTrue( new Version( 1, 0, 0 ).equals( v1 ) );

        final Version v2 = Version.getVersion( "0.3" );
        assertTrue( new Version( 0, 3, 0 ).equals( v2 ) );

        final Version v3 = Version.getVersion( "78.10.03" );
        assertTrue( new Version( 78, 10, 3 ).equals( v3 ) );


        try
        {
            final Version v4 = Version.getVersion( null );

            fail( "Expected an exception!" );
        }
        catch( NullPointerException th )
        {}
View Full Code Here

Examples of org.apache.axis2.description.Version

            module.setModuleClassLoader(deploymentClassLoader);
            module.setParent(axisConfiguration);

            if (module.getName() == null) {
                module.setName("rampart-1.4");
                module.setVersion(new Version("1.4"));
            }
           
            populateModule(axis2ConfigContext, module, rampartURL);
            module.setFileName(rampartURL);
           
View Full Code Here

Examples of org.apache.beehive.controls.api.versioning.Version

     * Enforces the VersionRequired annotation for control fields.
     */
    private void enforceVersionRequired( FieldDeclaration f, InterfaceDeclaration controlIntf )
    {
        VersionRequired versionRequired = f.getAnnotation(VersionRequired.class);
        Version versionPresent = controlIntf.getAnnotation(Version.class);

        if ( versionRequired != null )
        {
            int majorRequired = versionRequired.major();
            int minorRequired = versionRequired.minor();

            if ( majorRequired < 0 )    // no real version requirement
                return;

            int majorPresent = -1;
            int minorPresent = -1;
            if ( versionPresent != null )
            {
                majorPresent = versionPresent.major();
                minorPresent = versionPresent.minor();

                if ( majorRequired <= majorPresent &&
                     (minorRequired < 0 || minorRequired <= minorPresent) )
                {
                    // Version requirement is satisfied
View Full Code Here

Examples of org.apache.bookkeeper.versioning.Version

    }

    @Override
    public void writeLedgerMetadata(final long ledgerId, final LedgerMetadata metadata,
                                    final GenericCallback<Void> cb) {
        Version v = metadata.getVersion();
        if (Version.NEW == v || !(v instanceof ZkVersion)) {
            cb.operationComplete(BKException.Code.MetadataVersionException, null);
            return;
        }
        final ZkVersion zv = (ZkVersion) v;
View Full Code Here

Examples of org.apache.cactus.integration.api.version.Version

     * @return the CactusWar configuration
     */
    private CactusWar createCactusWarConfig()
    {
        CactusWar cactusWarConfig = new CactusWar();
        Version version = new Version();
        version.setValue("2.3");
        cactusWarConfig.setVersion(version);
        cactusWarConfig.setContext("/cactus");
        cactusWarConfig.setProject(getProject());
       
        return cactusWarConfig;
View Full Code Here

Examples of org.apache.cassandra.io.sstable.format.Version

        // generation
        int generation = Integer.parseInt(nexttok);

        // version
        nexttok = tokenStack.pop();
        Version version = fmt.info.getVersion(nexttok);

        if (!version.validate(nexttok))
            throw new UnsupportedOperationException("SSTable " + name + " is too old to open.  Upgrade to 2.0 first, and run upgradesstables");

        // optional temporary marker
        Type type = Descriptor.Type.FINAL;
        nexttok = tokenStack.peek();
        if (Descriptor.Type.TEMP.marker.equals(nexttok))
        {
            type = Descriptor.Type.TEMP;
            tokenStack.pop();
        }
        else if (Descriptor.Type.TEMPLINK.marker.equals(nexttok))
        {
            type = Descriptor.Type.TEMPLINK;
            tokenStack.pop();
        }

        // ks/cf names
        String ksname, cfname;
        if (version.hasNewFileName())
        {
            // for 2.1+ read ks and cf names from directory
            File cfDirectory = parentDirectory;
            // check if this is secondary index
            String indexName = "";
View Full Code Here

Examples of org.apache.cayenne.modeler.util.Version

        if (prefs == null || prefs.length == 0) {
            return false;
        }

        // find older version
        Version currentVersion = new Version(versionName);
        Version previousVersion = new Version("0");
        File lastDir = null;
        for (int i = 0; i < prefs.length; i++) {
            File dir = new File(prefsDir, prefs[i]);
            if (dir.isDirectory() && new File(dir, baseName + ".properties").isFile()) {

                // check that there are DB files

                Version v;
                try {
                    v = new Version(prefs[i]);
                }
                catch (NumberFormatException nfex) {
                    // ignore... not a version dir...
                    continue;
                }

                if (v.compareTo(currentVersion) < 0 && v.compareTo(previousVersion) > 0) {
                    previousVersion = v;
                    lastDir = dir;
                }
            }
        }
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.