Package org.apache.accumulo.core.tabletserver.log

Examples of org.apache.accumulo.core.tabletserver.log.LogEntry


    log.info("Adding " + logs.size() + " logs for extent " + extent + " as alias " + id);
    long now = RelativeTime.currentTimeMillis();
    List<String> logSet = new ArrayList<String>();
    for (DfsLogger log : logs)
      logSet.add(log.getFileName());
    LogEntry entry = new LogEntry();
    entry.extent = extent;
    entry.tabletId = id;
    entry.timestamp = now;
    entry.server = logs.get(0).getLogger();
    entry.filename = logs.get(0).getFileName();
View Full Code Here


    if (numSwitched == 0) {
      log.trace("Did not switch " + le);
      return null;
    }

    LogEntry newLogEntry = new LogEntry(le);
    newLogEntry.filename = switchedPath;
    newLogEntry.logSet = switchedLogs;

    log.trace("Switched " + le + " to " + newLogEntry);
View Full Code Here

    SortedMap<FileRef,DataFileValue> filesToAdd = new TreeMap<FileRef,DataFileValue>();

    TabletFiles ret = new TabletFiles();

    for (LogEntry logEntry : tabletFiles.logEntries) {
      LogEntry switchedLogEntry = switchVolumes(logEntry, replacements);
      if (switchedLogEntry != null) {
        logsToRemove.add(logEntry);
        logsToAdd.add(switchedLogEntry);
        ret.logEntries.add(switchedLogEntry);
        log.debug("Replacing volume " + extent + " : " + logEntry.filename + " -> " + switchedLogEntry.filename);
View Full Code Here

    // there's a little race between getting the children and fetching
    // the data. The log can be removed in between.
    while (true) {
      result.clear();
      for (String child : zoo.getChildren(root)) {
        LogEntry e = new LogEntry();
        try {
          e.fromBytes(zoo.getData(root + "/" + child, null));
          // upgrade from !0;!0<< -> +r<<
          e.extent = RootTable.EXTENT;
          result.add(e);
        } catch (KeeperException.NoNodeException ex) {
          continue;
View Full Code Here

    log.info("Adding " + logs.size() + " logs for extent " + extent + " as alias " + id);
    long now = RelativeTime.currentTimeMillis();
    List<String> logSet = new ArrayList<String>();
    for (DfsLogger log : logs)
      logSet.add(log.getFileName());
    LogEntry entry = new LogEntry();
    entry.extent = extent;
    entry.tabletId = id;
    entry.timestamp = now;
    entry.server = logs.get(0).getLogger();
    entry.filename = logs.get(0).getFileName();
View Full Code Here

    for (Entry<Key,Value> entry : scanner) {
      if (entry.getKey().getColumnFamily().equals(MetadataSchema.TabletsSection.DataFileColumnFamily.NAME)) {
        volumes.add(getTableURI(entry.getKey().getColumnQualifier().toString()));
      } else if (entry.getKey().getColumnFamily().equals(MetadataSchema.TabletsSection.LogColumnFamily.NAME)) {
        LogEntry le = LogEntry.fromKeyValue(entry.getKey(), entry.getValue());
        getLogURIs(volumes, le);
      } else if (MetadataSchema.TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.hasColumns(entry.getKey())) {
        volumes.add(getTableURI(entry.getValue().toString()));
      }
    }
View Full Code Here

          }
          List<Collection<String>> logs = new ArrayList<Collection<String>>();
          for (String entry : store.getChildren(RootTable.ZROOT_TABLET_WALOGS)) {
            byte[] logInfo = store.get(RootTable.ZROOT_TABLET_WALOGS + "/" + entry);
            if (logInfo != null) {
              LogEntry logEntry = new LogEntry();
              logEntry.fromBytes(logInfo);
              logs.add(logEntry.logSet);
              log.debug("root tablet logSet " + logEntry.logSet);
            }
          }
          TabletLocationState result = new TabletLocationState(RootTable.EXTENT, futureSession, currentSession, lastSession, logs, false);
View Full Code Here

    if (numSwitched == 0) {
      log.trace("Did not switch " + le);
      return null;
    }

    LogEntry newLogEntry = new LogEntry(le);
    newLogEntry.filename = switchedPath;
    newLogEntry.logSet = switchedLogs;

    log.trace("Switched " + le + " to " + newLogEntry);
View Full Code Here

    SortedMap<FileRef,DataFileValue> filesToAdd = new TreeMap<FileRef,DataFileValue>();

    TabletFiles ret = new TabletFiles();

    for (LogEntry logEntry : tabletFiles.logEntries) {
      LogEntry switchedLogEntry = switchVolumes(logEntry, replacements);
      if (switchedLogEntry != null) {
        logsToRemove.add(logEntry);
        logsToAdd.add(switchedLogEntry);
        ret.logEntries.add(switchedLogEntry);
        log.debug("Replacing volume " + extent + " : " + logEntry.filename + " -> " + switchedLogEntry.filename);
View Full Code Here

    // there's a little race between getting the children and fetching
    // the data. The log can be removed in between.
    while (true) {
      result.clear();
      for (String child : zoo.getChildren(root)) {
        LogEntry e = new LogEntry();
        try {
          e.fromBytes(zoo.getData(root + "/" + child, null));
          // upgrade from !0;!0<< -> +r<<
          e.extent = RootTable.EXTENT;
          result.add(e);
        } catch (KeeperException.NoNodeException ex) {
          continue;
View Full Code Here

TOP

Related Classes of org.apache.accumulo.core.tabletserver.log.LogEntry

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.