Examples of Snapshot


Examples of org.apache.hadoop.hbase.HMemcache.Snapshot

    HLog log = getLogfile();
    try {
      // Add some rows, run a snapshot. Do it a few times.
      for (int i = 0; i < snapshotCount; i++) {
        addRows(this.hmemcache);
        Snapshot s = runSnapshot(this.hmemcache, log);
        log.completeCacheFlush(new Text(Integer.toString(i)),
            tableName, s.sequenceId);
        // Clean up snapshot now we are done with it.
        this.hmemcache.deleteSnapshot();
      }
View Full Code Here

Examples of org.apache.hadoop.hbase.HMemcache.Snapshot

   
    // Save off old state.
    int oldHistorySize = hmc.history.size();
    SortedMap<HStoreKey, byte []> oldMemcache = hmc.memcache;
    // Run snapshot.
    Snapshot s = hmc.snapshotMemcacheForLog(log);
    // Make some assertions about what just happened.
    assertEquals("Snapshot equals old memcache", hmc.snapshot,
        oldMemcache);
    assertEquals("Returned snapshot holds old memcache",
        s.memcacheSnapshot, oldMemcache);
View Full Code Here

Examples of org.apache.hadoop.hbase.HMemcache.Snapshot

    HLog log = getLogfile();
    // Add some rows, run a snapshot. Do it a few times.
    for (int i = 0; i < snapshotCount; i++) {
      addRows(this.hmemcache);
      int historyInitialSize = this.hmemcache.history.size();
      Snapshot s = runSnapshot(this.hmemcache, log);
      log.completeCacheFlush(new Text(Integer.toString(i)),
          tableName, s.sequenceId);
      // Clean up snapshot now we are done with it.
      this.hmemcache.deleteSnapshot();
      assertTrue("History not being cleared",
View Full Code Here

Examples of org.apache.hadoop.hbase.metrics.histogram.Snapshot

        histogram.getName() + "Mean",
        StringUtils.limitDecimalTo2(histogram.getMean()));
    sb = Strings.appendKeyValue(sb,
        histogram.getName() + "Count",
        StringUtils.limitDecimalTo2(histogram.getCount()));
    final Snapshot s = histogram.getSnapshot();
    sb = Strings.appendKeyValue(sb,
        histogram.getName() + "Median",
        StringUtils.limitDecimalTo2(s.getMedian()));
    sb = Strings.appendKeyValue(sb,
        histogram.getName() + "75th",
        StringUtils.limitDecimalTo2(s.get75thPercentile()));
    sb = Strings.appendKeyValue(sb,
        histogram.getName() + "95th",
        StringUtils.limitDecimalTo2(s.get95thPercentile()));
    sb = Strings.appendKeyValue(sb,
        histogram.getName() + "99th",
        StringUtils.limitDecimalTo2(s.get99thPercentile()));
    sb = Strings.appendKeyValue(sb,
        histogram.getName() + "999th",
        StringUtils.limitDecimalTo2(s.get999thPercentile()));
    return sb;
  }
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.namenode.snapshot.Snapshot

        // check if ".snapshot" is the last element of components
        if (count == components.length - 1) {
          break;
        }
        // Resolve snapshot root
        final Snapshot s = ((INodeDirectorySnapshottable)dir).getSnapshot(
            components[count + 1]);
        if (s == null) {
          //snapshot not found
          curNode = null;
        } else {
          curNode = s.getRoot();
          existing.setSnapshotId(s.getId());
        }
        if (index >= -1) {
          existing.snapshotRootIndex = existing.numNonNull;
        }
      } else {
View Full Code Here

Examples of org.apache.maven.artifact.repository.metadata.Snapshot

    }

    @Override
    protected void merge( Metadata recessive )
    {
        Snapshot snapshot;
        String lastUpdated = "";

        if ( metadata.getVersioning() == null )
        {
            DateFormat utcDateFormatter = new SimpleDateFormat( "yyyyMMdd.HHmmss" );
            utcDateFormatter.setTimeZone( TimeZone.getTimeZone( "UTC" ) );

            snapshot = new Snapshot();
            snapshot.setBuildNumber( getBuildNumber( recessive ) + 1 );
            snapshot.setTimestamp( utcDateFormatter.format( new Date() ) );

            Versioning versioning = new Versioning();
            versioning.setSnapshot( snapshot );
            versioning.setLastUpdated( snapshot.getTimestamp().replace( ".", "" ) );
            lastUpdated = versioning.getLastUpdated();

            metadata.setVersioning( versioning );
        }
        else
        {
            snapshot = metadata.getVersioning().getSnapshot();
            lastUpdated = metadata.getVersioning().getLastUpdated();
        }

        for ( Artifact artifact : artifacts )
        {
            String version = artifact.getVersion();

            if ( version.endsWith( SNAPSHOT ) )
            {
                String qualifier = snapshot.getTimestamp() + "-" + snapshot.getBuildNumber();
                version = version.substring( 0, version.length() - SNAPSHOT.length() ) + qualifier;
            }

            SnapshotVersion sv = new SnapshotVersion();
            sv.setClassifier( artifact.getClassifier() );
View Full Code Here

Examples of org.apache.maven.artifact.repository.metadata.Snapshot

        int number = 0;

        Versioning versioning = metadata.getVersioning();
        if ( versioning != null )
        {
            Snapshot snapshot = versioning.getSnapshot();
            if ( snapshot != null && snapshot.getBuildNumber() > 0 )
            {
                number = snapshot.getBuildNumber();
            }
        }

        return number;
    }
View Full Code Here

Examples of org.apache.maven.artifact.repository.metadata.Snapshot

                        {
                            if ( versioning.getSnapshot() != null && versioning.getSnapshot().getBuildNumber() > 0 )
                            {
                                Versioning repaired = new Versioning();
                                repaired.setLastUpdated( versioning.getLastUpdated() );
                                Snapshot snapshot = new Snapshot();
                                snapshot.setLocalCopy( true );
                                repaired.setSnapshot( snapshot );
                                versioning = repaired;

                                throw new IOException( "Snapshot information corrupted with remote repository data"
                                    + ", please verify that no remote repository uses the id '" + repository.getId()
View Full Code Here

Examples of org.apache.maven.artifact.repository.metadata.Snapshot

                String key = getKey( sv.getClassifier(), sv.getExtension() );
                merge( SNAPSHOT + key, infos, sv.getUpdated(), sv.getVersion(), repository );
            }
        }

        Snapshot snapshot = versioning.getSnapshot();
        if ( snapshot != null && versioning.getSnapshotVersions().isEmpty() )
        {
            String version = artifact.getVersion();
            if ( snapshot.getTimestamp() != null && snapshot.getBuildNumber() > 0 )
            {
                String qualifier = snapshot.getTimestamp() + '-' + snapshot.getBuildNumber();
                version = version.substring( 0, version.length() - SNAPSHOT.length() ) + qualifier;
            }
            merge( SNAPSHOT, infos, versioning.getLastUpdated(), version, repository );
        }
    }
View Full Code Here

Examples of org.apache.maven.artifact.repository.metadata.Snapshot

        this.legacyFormat = legacyFormat;
    }

    private static Metadata createMetadata( Artifact artifact, boolean legacyFormat )
    {
        Snapshot snapshot = new Snapshot();
        snapshot.setLocalCopy( true );
        Versioning versioning = new Versioning();
        versioning.setSnapshot( snapshot );

        Metadata metadata = new Metadata();
        metadata.setVersioning( versioning );
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.