accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1344396 [2/3] - in /accumulo/branches/ACCUMULO-578: core/src/main/java/org/apache/accumulo/core/ core/src/main/java/org/apache/accumulo/core/master/thrift/ core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ core/src/main/java...
Date Wed, 30 May 2012 18:34:44 GMT
Modified: accumulo/branches/ACCUMULO-578/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TabletClientService.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-578/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TabletClientService.java?rev=1344396&r1=1344395&r2=1344396&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-578/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TabletClientService.java (original)
+++ accumulo/branches/ACCUMULO-578/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TabletClientService.java Wed May 30 18:34:43 2012
@@ -72,8 +72,6 @@ import org.slf4j.LoggerFactory;
 
     public List<ActiveScan> getActiveScans(org.apache.accumulo.cloudtrace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.AuthInfo credentials) throws org.apache.accumulo.core.security.thrift.ThriftSecurityException, org.apache.thrift.TException;
 
-    public double sortLog(org.apache.accumulo.cloudtrace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.AuthInfo credentials, String lock, String path) throws org.apache.accumulo.core.security.thrift.ThriftSecurityException, org.apache.thrift.TException;
-
     public void removeLogs(org.apache.accumulo.cloudtrace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.AuthInfo credentials, List<String> filenames) throws org.apache.thrift.TException;
 
   }
@@ -128,8 +126,6 @@ import org.slf4j.LoggerFactory;
 
     public void getActiveScans(org.apache.accumulo.cloudtrace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.AuthInfo credentials, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getActiveScans_call> resultHandler) throws org.apache.thrift.TException;
 
-    public void sortLog(org.apache.accumulo.cloudtrace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.AuthInfo credentials, String lock, String path, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.sortLog_call> resultHandler) throws org.apache.thrift.TException;
-
     public void removeLogs(org.apache.accumulo.cloudtrace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.AuthInfo credentials, List<String> filenames, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.removeLogs_call> resultHandler) throws org.apache.thrift.TException;
 
   }
@@ -952,48 +948,6 @@ import org.slf4j.LoggerFactory;
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getActiveScans failed: unknown result");
     }
 
-    public double sortLog(org.apache.accumulo.cloudtrace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.AuthInfo credentials, String lock, String path) throws org.apache.accumulo.core.security.thrift.ThriftSecurityException, org.apache.thrift.TException
-    {
-      send_sortLog(tinfo, credentials, lock, path);
-      return recv_sortLog();
-    }
-
-    public void send_sortLog(org.apache.accumulo.cloudtrace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.AuthInfo credentials, String lock, String path) throws org.apache.thrift.TException
-    {
-      oprot_.writeMessageBegin(new org.apache.thrift.protocol.TMessage("sortLog", org.apache.thrift.protocol.TMessageType.CALL, ++seqid_));
-      sortLog_args args = new sortLog_args();
-      args.setTinfo(tinfo);
-      args.setCredentials(credentials);
-      args.setLock(lock);
-      args.setPath(path);
-      args.write(oprot_);
-      oprot_.writeMessageEnd();
-      oprot_.getTransport().flush();
-    }
-
-    public double recv_sortLog() throws org.apache.accumulo.core.security.thrift.ThriftSecurityException, org.apache.thrift.TException
-    {
-      org.apache.thrift.protocol.TMessage msg = iprot_.readMessageBegin();
-      if (msg.type == org.apache.thrift.protocol.TMessageType.EXCEPTION) {
-        org.apache.thrift.TApplicationException x = org.apache.thrift.TApplicationException.read(iprot_);
-        iprot_.readMessageEnd();
-        throw x;
-      }
-      if (msg.seqid != seqid_) {
-        throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.BAD_SEQUENCE_ID, "sortLog failed: out of sequence response");
-      }
-      sortLog_result result = new sortLog_result();
-      result.read(iprot_);
-      iprot_.readMessageEnd();
-      if (result.isSetSuccess()) {
-        return result.success;
-      }
-      if (result.sec != null) {
-        throw result.sec;
-      }
-      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "sortLog failed: unknown result");
-    }
-
     public void removeLogs(org.apache.accumulo.cloudtrace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.AuthInfo credentials, List<String> filenames) throws org.apache.thrift.TException
     {
       send_removeLogs(tinfo, credentials, filenames);
@@ -1992,47 +1946,6 @@ import org.slf4j.LoggerFactory;
       }
     }
 
-    public void sortLog(org.apache.accumulo.cloudtrace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.AuthInfo credentials, String lock, String path, org.apache.thrift.async.AsyncMethodCallback<sortLog_call> resultHandler) throws org.apache.thrift.TException {
-      checkReady();
-      sortLog_call method_call = new sortLog_call(tinfo, credentials, lock, path, resultHandler, this, protocolFactory, transport);
-      this.currentMethod = method_call;
-      manager.call(method_call);
-    }
-
-    public static class sortLog_call extends org.apache.thrift.async.TAsyncMethodCall {
-      private org.apache.accumulo.cloudtrace.thrift.TInfo tinfo;
-      private org.apache.accumulo.core.security.thrift.AuthInfo credentials;
-      private String lock;
-      private String path;
-      public sortLog_call(org.apache.accumulo.cloudtrace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.AuthInfo credentials, String lock, String path, org.apache.thrift.async.AsyncMethodCallback<sortLog_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
-        super(client, protocolFactory, transport, resultHandler, false);
-        this.tinfo = tinfo;
-        this.credentials = credentials;
-        this.lock = lock;
-        this.path = path;
-      }
-
-      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("sortLog", org.apache.thrift.protocol.TMessageType.CALL, 0));
-        sortLog_args args = new sortLog_args();
-        args.setTinfo(tinfo);
-        args.setCredentials(credentials);
-        args.setLock(lock);
-        args.setPath(path);
-        args.write(prot);
-        prot.writeMessageEnd();
-      }
-
-      public double getResult() throws org.apache.accumulo.core.security.thrift.ThriftSecurityException, org.apache.thrift.TException {
-        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-          throw new IllegalStateException("Method call not finished!");
-        }
-        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-        return (new Client(prot)).recv_sortLog();
-      }
-    }
-
     public void removeLogs(org.apache.accumulo.cloudtrace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.AuthInfo credentials, List<String> filenames, org.apache.thrift.async.AsyncMethodCallback<removeLogs_call> resultHandler) throws org.apache.thrift.TException {
       checkReady();
       removeLogs_call method_call = new removeLogs_call(tinfo, credentials, filenames, resultHandler, this, protocolFactory, transport);
@@ -2102,7 +2015,6 @@ import org.slf4j.LoggerFactory;
       processMap_.put("halt", new halt());
       processMap_.put("fastHalt", new fastHalt());
       processMap_.put("getActiveScans", new getActiveScans());
-      processMap_.put("sortLog", new sortLog());
       processMap_.put("removeLogs", new removeLogs());
     }
 
@@ -2900,45 +2812,6 @@ import org.slf4j.LoggerFactory;
 
     }
 
-    private class sortLog implements ProcessFunction {
-      public void process(int seqid, org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException
-      {
-        sortLog_args args = new sortLog_args();
-        try {
-          args.read(iprot);
-        } catch (org.apache.thrift.protocol.TProtocolException e) {
-          iprot.readMessageEnd();
-          org.apache.thrift.TApplicationException x = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.PROTOCOL_ERROR, e.getMessage());
-          oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("sortLog", org.apache.thrift.protocol.TMessageType.EXCEPTION, seqid));
-          x.write(oprot);
-          oprot.writeMessageEnd();
-          oprot.getTransport().flush();
-          return;
-        }
-        iprot.readMessageEnd();
-        sortLog_result result = new sortLog_result();
-        try {
-          result.success = iface_.sortLog(args.tinfo, args.credentials, args.lock, args.path);
-          result.setSuccessIsSet(true);
-        } catch (org.apache.accumulo.core.security.thrift.ThriftSecurityException sec) {
-          result.sec = sec;
-        } catch (Throwable th) {
-          LOGGER.error("Internal error processing sortLog", th);
-          org.apache.thrift.TApplicationException x = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, "Internal error processing sortLog");
-          oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("sortLog", org.apache.thrift.protocol.TMessageType.EXCEPTION, seqid));
-          x.write(oprot);
-          oprot.writeMessageEnd();
-          oprot.getTransport().flush();
-          return;
-        }
-        oprot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("sortLog", org.apache.thrift.protocol.TMessageType.REPLY, seqid));
-        result.write(oprot);
-        oprot.writeMessageEnd();
-        oprot.getTransport().flush();
-      }
-
-    }
-
     private class removeLogs implements ProcessFunction {
       public void process(int seqid, org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException
       {
@@ -22928,957 +22801,6 @@ import org.slf4j.LoggerFactory;
 
   }
 
-  public static class sortLog_args implements org.apache.thrift.TBase<sortLog_args, sortLog_args._Fields>, java.io.Serializable, Cloneable   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("sortLog_args");
-
-    private static final org.apache.thrift.protocol.TField TINFO_FIELD_DESC = new org.apache.thrift.protocol.TField("tinfo", org.apache.thrift.protocol.TType.STRUCT, (short)1);
-    private static final org.apache.thrift.protocol.TField CREDENTIALS_FIELD_DESC = new org.apache.thrift.protocol.TField("credentials", org.apache.thrift.protocol.TType.STRUCT, (short)2);
-    private static final org.apache.thrift.protocol.TField LOCK_FIELD_DESC = new org.apache.thrift.protocol.TField("lock", org.apache.thrift.protocol.TType.STRING, (short)3);
-    private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)4);
-
-    public org.apache.accumulo.cloudtrace.thrift.TInfo tinfo;
-    public org.apache.accumulo.core.security.thrift.AuthInfo credentials;
-    public String lock;
-    public String path;
-
-    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-      TINFO((short)1, "tinfo"),
-      CREDENTIALS((short)2, "credentials"),
-      LOCK((short)3, "lock"),
-      PATH((short)4, "path");
-
-      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
-      static {
-        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-          byName.put(field.getFieldName(), field);
-        }
-      }
-
-      /**
-       * Find the _Fields constant that matches fieldId, or null if its not found.
-       */
-      public static _Fields findByThriftId(int fieldId) {
-        switch(fieldId) {
-          case 1: // TINFO
-            return TINFO;
-          case 2: // CREDENTIALS
-            return CREDENTIALS;
-          case 3: // LOCK
-            return LOCK;
-          case 4: // PATH
-            return PATH;
-          default:
-            return null;
-        }
-      }
-
-      /**
-       * Find the _Fields constant that matches fieldId, throwing an exception
-       * if it is not found.
-       */
-      public static _Fields findByThriftIdOrThrow(int fieldId) {
-        _Fields fields = findByThriftId(fieldId);
-        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-        return fields;
-      }
-
-      /**
-       * Find the _Fields constant that matches name, or null if its not found.
-       */
-      public static _Fields findByName(String name) {
-        return byName.get(name);
-      }
-
-      private final short _thriftId;
-      private final String _fieldName;
-
-      _Fields(short thriftId, String fieldName) {
-        _thriftId = thriftId;
-        _fieldName = fieldName;
-      }
-
-      public short getThriftFieldId() {
-        return _thriftId;
-      }
-
-      public String getFieldName() {
-        return _fieldName;
-      }
-    }
-
-    // isset id assignments
-
-    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-    static {
-      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-      tmpMap.put(_Fields.TINFO, new org.apache.thrift.meta_data.FieldMetaData("tinfo", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.cloudtrace.thrift.TInfo.class)));
-      tmpMap.put(_Fields.CREDENTIALS, new org.apache.thrift.meta_data.FieldMetaData("credentials", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.security.thrift.AuthInfo.class)));
-      tmpMap.put(_Fields.LOCK, new org.apache.thrift.meta_data.FieldMetaData("lock", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-      tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-      metaDataMap = Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sortLog_args.class, metaDataMap);
-    }
-
-    public sortLog_args() {
-    }
-
-    public sortLog_args(
-      org.apache.accumulo.cloudtrace.thrift.TInfo tinfo,
-      org.apache.accumulo.core.security.thrift.AuthInfo credentials,
-      String lock,
-      String path)
-    {
-      this();
-      this.tinfo = tinfo;
-      this.credentials = credentials;
-      this.lock = lock;
-      this.path = path;
-    }
-
-    /**
-     * Performs a deep copy on <i>other</i>.
-     */
-    public sortLog_args(sortLog_args other) {
-      if (other.isSetTinfo()) {
-        this.tinfo = new org.apache.accumulo.cloudtrace.thrift.TInfo(other.tinfo);
-      }
-      if (other.isSetCredentials()) {
-        this.credentials = new org.apache.accumulo.core.security.thrift.AuthInfo(other.credentials);
-      }
-      if (other.isSetLock()) {
-        this.lock = other.lock;
-      }
-      if (other.isSetPath()) {
-        this.path = other.path;
-      }
-    }
-
-    public sortLog_args deepCopy() {
-      return new sortLog_args(this);
-    }
-
-    @Override
-    public void clear() {
-      this.tinfo = null;
-      this.credentials = null;
-      this.lock = null;
-      this.path = null;
-    }
-
-    public org.apache.accumulo.cloudtrace.thrift.TInfo getTinfo() {
-      return this.tinfo;
-    }
-
-    public sortLog_args setTinfo(org.apache.accumulo.cloudtrace.thrift.TInfo tinfo) {
-      this.tinfo = tinfo;
-      return this;
-    }
-
-    public void unsetTinfo() {
-      this.tinfo = null;
-    }
-
-    /** Returns true if field tinfo is set (has been assigned a value) and false otherwise */
-    public boolean isSetTinfo() {
-      return this.tinfo != null;
-    }
-
-    public void setTinfoIsSet(boolean value) {
-      if (!value) {
-        this.tinfo = null;
-      }
-    }
-
-    public org.apache.accumulo.core.security.thrift.AuthInfo getCredentials() {
-      return this.credentials;
-    }
-
-    public sortLog_args setCredentials(org.apache.accumulo.core.security.thrift.AuthInfo credentials) {
-      this.credentials = credentials;
-      return this;
-    }
-
-    public void unsetCredentials() {
-      this.credentials = null;
-    }
-
-    /** Returns true if field credentials is set (has been assigned a value) and false otherwise */
-    public boolean isSetCredentials() {
-      return this.credentials != null;
-    }
-
-    public void setCredentialsIsSet(boolean value) {
-      if (!value) {
-        this.credentials = null;
-      }
-    }
-
-    public String getLock() {
-      return this.lock;
-    }
-
-    public sortLog_args setLock(String lock) {
-      this.lock = lock;
-      return this;
-    }
-
-    public void unsetLock() {
-      this.lock = null;
-    }
-
-    /** Returns true if field lock is set (has been assigned a value) and false otherwise */
-    public boolean isSetLock() {
-      return this.lock != null;
-    }
-
-    public void setLockIsSet(boolean value) {
-      if (!value) {
-        this.lock = null;
-      }
-    }
-
-    public String getPath() {
-      return this.path;
-    }
-
-    public sortLog_args setPath(String path) {
-      this.path = path;
-      return this;
-    }
-
-    public void unsetPath() {
-      this.path = null;
-    }
-
-    /** Returns true if field path is set (has been assigned a value) and false otherwise */
-    public boolean isSetPath() {
-      return this.path != null;
-    }
-
-    public void setPathIsSet(boolean value) {
-      if (!value) {
-        this.path = null;
-      }
-    }
-
-    public void setFieldValue(_Fields field, Object value) {
-      switch (field) {
-      case TINFO:
-        if (value == null) {
-          unsetTinfo();
-        } else {
-          setTinfo((org.apache.accumulo.cloudtrace.thrift.TInfo)value);
-        }
-        break;
-
-      case CREDENTIALS:
-        if (value == null) {
-          unsetCredentials();
-        } else {
-          setCredentials((org.apache.accumulo.core.security.thrift.AuthInfo)value);
-        }
-        break;
-
-      case LOCK:
-        if (value == null) {
-          unsetLock();
-        } else {
-          setLock((String)value);
-        }
-        break;
-
-      case PATH:
-        if (value == null) {
-          unsetPath();
-        } else {
-          setPath((String)value);
-        }
-        break;
-
-      }
-    }
-
-    public Object getFieldValue(_Fields field) {
-      switch (field) {
-      case TINFO:
-        return getTinfo();
-
-      case CREDENTIALS:
-        return getCredentials();
-
-      case LOCK:
-        return getLock();
-
-      case PATH:
-        return getPath();
-
-      }
-      throw new IllegalStateException();
-    }
-
-    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-    public boolean isSet(_Fields field) {
-      if (field == null) {
-        throw new IllegalArgumentException();
-      }
-
-      switch (field) {
-      case TINFO:
-        return isSetTinfo();
-      case CREDENTIALS:
-        return isSetCredentials();
-      case LOCK:
-        return isSetLock();
-      case PATH:
-        return isSetPath();
-      }
-      throw new IllegalStateException();
-    }
-
-    @Override
-    public boolean equals(Object that) {
-      if (that == null)
-        return false;
-      if (that instanceof sortLog_args)
-        return this.equals((sortLog_args)that);
-      return false;
-    }
-
-    public boolean equals(sortLog_args that) {
-      if (that == null)
-        return false;
-
-      boolean this_present_tinfo = true && this.isSetTinfo();
-      boolean that_present_tinfo = true && that.isSetTinfo();
-      if (this_present_tinfo || that_present_tinfo) {
-        if (!(this_present_tinfo && that_present_tinfo))
-          return false;
-        if (!this.tinfo.equals(that.tinfo))
-          return false;
-      }
-
-      boolean this_present_credentials = true && this.isSetCredentials();
-      boolean that_present_credentials = true && that.isSetCredentials();
-      if (this_present_credentials || that_present_credentials) {
-        if (!(this_present_credentials && that_present_credentials))
-          return false;
-        if (!this.credentials.equals(that.credentials))
-          return false;
-      }
-
-      boolean this_present_lock = true && this.isSetLock();
-      boolean that_present_lock = true && that.isSetLock();
-      if (this_present_lock || that_present_lock) {
-        if (!(this_present_lock && that_present_lock))
-          return false;
-        if (!this.lock.equals(that.lock))
-          return false;
-      }
-
-      boolean this_present_path = true && this.isSetPath();
-      boolean that_present_path = true && that.isSetPath();
-      if (this_present_path || that_present_path) {
-        if (!(this_present_path && that_present_path))
-          return false;
-        if (!this.path.equals(that.path))
-          return false;
-      }
-
-      return true;
-    }
-
-    @Override
-    public int hashCode() {
-      return 0;
-    }
-
-    public int compareTo(sortLog_args other) {
-      if (!getClass().equals(other.getClass())) {
-        return getClass().getName().compareTo(other.getClass().getName());
-      }
-
-      int lastComparison = 0;
-      sortLog_args typedOther = (sortLog_args)other;
-
-      lastComparison = Boolean.valueOf(isSetTinfo()).compareTo(typedOther.isSetTinfo());
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-      if (isSetTinfo()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tinfo, typedOther.tinfo);
-        if (lastComparison != 0) {
-          return lastComparison;
-        }
-      }
-      lastComparison = Boolean.valueOf(isSetCredentials()).compareTo(typedOther.isSetCredentials());
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-      if (isSetCredentials()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.credentials, typedOther.credentials);
-        if (lastComparison != 0) {
-          return lastComparison;
-        }
-      }
-      lastComparison = Boolean.valueOf(isSetLock()).compareTo(typedOther.isSetLock());
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-      if (isSetLock()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lock, typedOther.lock);
-        if (lastComparison != 0) {
-          return lastComparison;
-        }
-      }
-      lastComparison = Boolean.valueOf(isSetPath()).compareTo(typedOther.isSetPath());
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-      if (isSetPath()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, typedOther.path);
-        if (lastComparison != 0) {
-          return lastComparison;
-        }
-      }
-      return 0;
-    }
-
-    public _Fields fieldForId(int fieldId) {
-      return _Fields.findByThriftId(fieldId);
-    }
-
-    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-      org.apache.thrift.protocol.TField field;
-      iprot.readStructBegin();
-      while (true)
-      {
-        field = iprot.readFieldBegin();
-        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-          break;
-        }
-        switch (field.id) {
-          case 1: // TINFO
-            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-              this.tinfo = new org.apache.accumulo.cloudtrace.thrift.TInfo();
-              this.tinfo.read(iprot);
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-            }
-            break;
-          case 2: // CREDENTIALS
-            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-              this.credentials = new org.apache.accumulo.core.security.thrift.AuthInfo();
-              this.credentials.read(iprot);
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-            }
-            break;
-          case 3: // LOCK
-            if (field.type == org.apache.thrift.protocol.TType.STRING) {
-              this.lock = iprot.readString();
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-            }
-            break;
-          case 4: // PATH
-            if (field.type == org.apache.thrift.protocol.TType.STRING) {
-              this.path = iprot.readString();
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-            }
-            break;
-          default:
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-        }
-        iprot.readFieldEnd();
-      }
-      iprot.readStructEnd();
-
-      // check for required fields of primitive type, which can't be checked in the validate method
-      validate();
-    }
-
-    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-      validate();
-
-      oprot.writeStructBegin(STRUCT_DESC);
-      if (this.tinfo != null) {
-        oprot.writeFieldBegin(TINFO_FIELD_DESC);
-        this.tinfo.write(oprot);
-        oprot.writeFieldEnd();
-      }
-      if (this.credentials != null) {
-        oprot.writeFieldBegin(CREDENTIALS_FIELD_DESC);
-        this.credentials.write(oprot);
-        oprot.writeFieldEnd();
-      }
-      if (this.lock != null) {
-        oprot.writeFieldBegin(LOCK_FIELD_DESC);
-        oprot.writeString(this.lock);
-        oprot.writeFieldEnd();
-      }
-      if (this.path != null) {
-        oprot.writeFieldBegin(PATH_FIELD_DESC);
-        oprot.writeString(this.path);
-        oprot.writeFieldEnd();
-      }
-      oprot.writeFieldStop();
-      oprot.writeStructEnd();
-    }
-
-    @Override
-    public String toString() {
-      StringBuilder sb = new StringBuilder("sortLog_args(");
-      boolean first = true;
-
-      sb.append("tinfo:");
-      if (this.tinfo == null) {
-        sb.append("null");
-      } else {
-        sb.append(this.tinfo);
-      }
-      first = false;
-      if (!first) sb.append(", ");
-      sb.append("credentials:");
-      if (this.credentials == null) {
-        sb.append("null");
-      } else {
-        sb.append(this.credentials);
-      }
-      first = false;
-      if (!first) sb.append(", ");
-      sb.append("lock:");
-      if (this.lock == null) {
-        sb.append("null");
-      } else {
-        sb.append(this.lock);
-      }
-      first = false;
-      if (!first) sb.append(", ");
-      sb.append("path:");
-      if (this.path == null) {
-        sb.append("null");
-      } else {
-        sb.append(this.path);
-      }
-      first = false;
-      sb.append(")");
-      return sb.toString();
-    }
-
-    public void validate() throws org.apache.thrift.TException {
-      // check for required fields
-    }
-
-    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-      try {
-        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-      } catch (org.apache.thrift.TException te) {
-        throw new java.io.IOException(te);
-      }
-    }
-
-    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-      try {
-        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-      } catch (org.apache.thrift.TException te) {
-        throw new java.io.IOException(te);
-      }
-    }
-
-  }
-
-  public static class sortLog_result implements org.apache.thrift.TBase<sortLog_result, sortLog_result._Fields>, java.io.Serializable, Cloneable   {
-    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("sortLog_result");
-
-    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.DOUBLE, (short)0);
-    private static final org.apache.thrift.protocol.TField SEC_FIELD_DESC = new org.apache.thrift.protocol.TField("sec", org.apache.thrift.protocol.TType.STRUCT, (short)1);
-
-    public double success;
-    public org.apache.accumulo.core.security.thrift.ThriftSecurityException sec;
-
-    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-      SUCCESS((short)0, "success"),
-      SEC((short)1, "sec");
-
-      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
-      static {
-        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-          byName.put(field.getFieldName(), field);
-        }
-      }
-
-      /**
-       * Find the _Fields constant that matches fieldId, or null if its not found.
-       */
-      public static _Fields findByThriftId(int fieldId) {
-        switch(fieldId) {
-          case 0: // SUCCESS
-            return SUCCESS;
-          case 1: // SEC
-            return SEC;
-          default:
-            return null;
-        }
-      }
-
-      /**
-       * Find the _Fields constant that matches fieldId, throwing an exception
-       * if it is not found.
-       */
-      public static _Fields findByThriftIdOrThrow(int fieldId) {
-        _Fields fields = findByThriftId(fieldId);
-        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-        return fields;
-      }
-
-      /**
-       * Find the _Fields constant that matches name, or null if its not found.
-       */
-      public static _Fields findByName(String name) {
-        return byName.get(name);
-      }
-
-      private final short _thriftId;
-      private final String _fieldName;
-
-      _Fields(short thriftId, String fieldName) {
-        _thriftId = thriftId;
-        _fieldName = fieldName;
-      }
-
-      public short getThriftFieldId() {
-        return _thriftId;
-      }
-
-      public String getFieldName() {
-        return _fieldName;
-      }
-    }
-
-    // isset id assignments
-    private static final int __SUCCESS_ISSET_ID = 0;
-    private BitSet __isset_bit_vector = new BitSet(1);
-
-    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-    static {
-      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
-      tmpMap.put(_Fields.SEC, new org.apache.thrift.meta_data.FieldMetaData("sec", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
-      metaDataMap = Collections.unmodifiableMap(tmpMap);
-      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sortLog_result.class, metaDataMap);
-    }
-
-    public sortLog_result() {
-    }
-
-    public sortLog_result(
-      double success,
-      org.apache.accumulo.core.security.thrift.ThriftSecurityException sec)
-    {
-      this();
-      this.success = success;
-      setSuccessIsSet(true);
-      this.sec = sec;
-    }
-
-    /**
-     * Performs a deep copy on <i>other</i>.
-     */
-    public sortLog_result(sortLog_result other) {
-      __isset_bit_vector.clear();
-      __isset_bit_vector.or(other.__isset_bit_vector);
-      this.success = other.success;
-      if (other.isSetSec()) {
-        this.sec = new org.apache.accumulo.core.security.thrift.ThriftSecurityException(other.sec);
-      }
-    }
-
-    public sortLog_result deepCopy() {
-      return new sortLog_result(this);
-    }
-
-    @Override
-    public void clear() {
-      setSuccessIsSet(false);
-      this.success = 0.0;
-      this.sec = null;
-    }
-
-    public double getSuccess() {
-      return this.success;
-    }
-
-    public sortLog_result setSuccess(double success) {
-      this.success = success;
-      setSuccessIsSet(true);
-      return this;
-    }
-
-    public void unsetSuccess() {
-      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
-    }
-
-    /** Returns true if field success is set (has been assigned a value) and false otherwise */
-    public boolean isSetSuccess() {
-      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
-    }
-
-    public void setSuccessIsSet(boolean value) {
-      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
-    }
-
-    public org.apache.accumulo.core.security.thrift.ThriftSecurityException getSec() {
-      return this.sec;
-    }
-
-    public sortLog_result setSec(org.apache.accumulo.core.security.thrift.ThriftSecurityException sec) {
-      this.sec = sec;
-      return this;
-    }
-
-    public void unsetSec() {
-      this.sec = null;
-    }
-
-    /** Returns true if field sec is set (has been assigned a value) and false otherwise */
-    public boolean isSetSec() {
-      return this.sec != null;
-    }
-
-    public void setSecIsSet(boolean value) {
-      if (!value) {
-        this.sec = null;
-      }
-    }
-
-    public void setFieldValue(_Fields field, Object value) {
-      switch (field) {
-      case SUCCESS:
-        if (value == null) {
-          unsetSuccess();
-        } else {
-          setSuccess((Double)value);
-        }
-        break;
-
-      case SEC:
-        if (value == null) {
-          unsetSec();
-        } else {
-          setSec((org.apache.accumulo.core.security.thrift.ThriftSecurityException)value);
-        }
-        break;
-
-      }
-    }
-
-    public Object getFieldValue(_Fields field) {
-      switch (field) {
-      case SUCCESS:
-        return new Double(getSuccess());
-
-      case SEC:
-        return getSec();
-
-      }
-      throw new IllegalStateException();
-    }
-
-    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-    public boolean isSet(_Fields field) {
-      if (field == null) {
-        throw new IllegalArgumentException();
-      }
-
-      switch (field) {
-      case SUCCESS:
-        return isSetSuccess();
-      case SEC:
-        return isSetSec();
-      }
-      throw new IllegalStateException();
-    }
-
-    @Override
-    public boolean equals(Object that) {
-      if (that == null)
-        return false;
-      if (that instanceof sortLog_result)
-        return this.equals((sortLog_result)that);
-      return false;
-    }
-
-    public boolean equals(sortLog_result that) {
-      if (that == null)
-        return false;
-
-      boolean this_present_success = true;
-      boolean that_present_success = true;
-      if (this_present_success || that_present_success) {
-        if (!(this_present_success && that_present_success))
-          return false;
-        if (this.success != that.success)
-          return false;
-      }
-
-      boolean this_present_sec = true && this.isSetSec();
-      boolean that_present_sec = true && that.isSetSec();
-      if (this_present_sec || that_present_sec) {
-        if (!(this_present_sec && that_present_sec))
-          return false;
-        if (!this.sec.equals(that.sec))
-          return false;
-      }
-
-      return true;
-    }
-
-    @Override
-    public int hashCode() {
-      return 0;
-    }
-
-    public int compareTo(sortLog_result other) {
-      if (!getClass().equals(other.getClass())) {
-        return getClass().getName().compareTo(other.getClass().getName());
-      }
-
-      int lastComparison = 0;
-      sortLog_result typedOther = (sortLog_result)other;
-
-      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-      if (isSetSuccess()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
-        if (lastComparison != 0) {
-          return lastComparison;
-        }
-      }
-      lastComparison = Boolean.valueOf(isSetSec()).compareTo(typedOther.isSetSec());
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-      if (isSetSec()) {
-        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sec, typedOther.sec);
-        if (lastComparison != 0) {
-          return lastComparison;
-        }
-      }
-      return 0;
-    }
-
-    public _Fields fieldForId(int fieldId) {
-      return _Fields.findByThriftId(fieldId);
-    }
-
-    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-      org.apache.thrift.protocol.TField field;
-      iprot.readStructBegin();
-      while (true)
-      {
-        field = iprot.readFieldBegin();
-        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-          break;
-        }
-        switch (field.id) {
-          case 0: // SUCCESS
-            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
-              this.success = iprot.readDouble();
-              setSuccessIsSet(true);
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-            }
-            break;
-          case 1: // SEC
-            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-              this.sec = new org.apache.accumulo.core.security.thrift.ThriftSecurityException();
-              this.sec.read(iprot);
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-            }
-            break;
-          default:
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-        }
-        iprot.readFieldEnd();
-      }
-      iprot.readStructEnd();
-
-      // check for required fields of primitive type, which can't be checked in the validate method
-      validate();
-    }
-
-    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-      oprot.writeStructBegin(STRUCT_DESC);
-
-      if (this.isSetSuccess()) {
-        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-        oprot.writeDouble(this.success);
-        oprot.writeFieldEnd();
-      } else if (this.isSetSec()) {
-        oprot.writeFieldBegin(SEC_FIELD_DESC);
-        this.sec.write(oprot);
-        oprot.writeFieldEnd();
-      }
-      oprot.writeFieldStop();
-      oprot.writeStructEnd();
-    }
-
-    @Override
-    public String toString() {
-      StringBuilder sb = new StringBuilder("sortLog_result(");
-      boolean first = true;
-
-      sb.append("success:");
-      sb.append(this.success);
-      first = false;
-      if (!first) sb.append(", ");
-      sb.append("sec:");
-      if (this.sec == null) {
-        sb.append("null");
-      } else {
-        sb.append(this.sec);
-      }
-      first = false;
-      sb.append(")");
-      return sb.toString();
-    }
-
-    public void validate() throws org.apache.thrift.TException {
-      // check for required fields
-    }
-
-    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-      try {
-        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-      } catch (org.apache.thrift.TException te) {
-        throw new java.io.IOException(te);
-      }
-    }
-
-    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-      try {
-        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-      } catch (org.apache.thrift.TException te) {
-        throw new java.io.IOException(te);
-      }
-    }
-
-  }
-
   public static class removeLogs_args implements org.apache.thrift.TBase<removeLogs_args, removeLogs_args._Fields>, java.io.Serializable, Cloneable   {
     private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("removeLogs_args");
 

Modified: accumulo/branches/ACCUMULO-578/core/src/main/java/org/apache/accumulo/core/util/shell/commands/SetIterCommand.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-578/core/src/main/java/org/apache/accumulo/core/util/shell/commands/SetIterCommand.java?rev=1344396&r1=1344395&r2=1344396&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-578/core/src/main/java/org/apache/accumulo/core/util/shell/commands/SetIterCommand.java (original)
+++ accumulo/branches/ACCUMULO-578/core/src/main/java/org/apache/accumulo/core/util/shell/commands/SetIterCommand.java Wed May 30 18:34:43 2012
@@ -49,6 +49,7 @@ import org.apache.commons.cli.Option;
 import org.apache.commons.cli.OptionGroup;
 import org.apache.commons.cli.Options;
 
+@SuppressWarnings("deprecation")
 public class SetIterCommand extends Command {
   
   private Option mincScopeOpt, majcScopeOpt, scanScopeOpt, nameOpt, priorityOpt;

Modified: accumulo/branches/ACCUMULO-578/core/src/main/thrift/master.thrift
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-578/core/src/main/thrift/master.thrift?rev=1344396&r1=1344395&r2=1344396&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-578/core/src/main/thrift/master.thrift (original)
+++ accumulo/branches/ACCUMULO-578/core/src/main/thrift/master.thrift Wed May 30 18:34:43 2012
@@ -42,12 +42,9 @@ struct TableInfo {
 }
 
 struct RecoveryStatus {
-    1:string host
     2:string name
-    3:double mapProgress
-    4:double reduceProgress
     5:i32 runtime                   // in millis
-    6:double copyProgress
+    6:double progress
 }
 
 struct TabletServerStatus {
@@ -60,7 +57,8 @@ struct TabletServerStatus {
     10:i64 indexCacheHits    
     11:i64 indexCacheRequest   
     12:i64 dataCacheHits   
-    13:i64 dataCacheRequest   
+    13:i64 dataCacheRequest
+    14:list<RecoveryStatus> logSorts
 }
 
 enum MasterState {
@@ -89,7 +87,6 @@ struct MasterMonitorInfo {
     1:map<string, TableInfo> tableMap
     2:list<TabletServerStatus> tServerInfo
     3:map<string, byte> badTServers
-    4:list<RecoveryStatus> recovery
     6:MasterState state
     8:MasterGoalState goalState
     7:i32 unassignedTablets

Modified: accumulo/branches/ACCUMULO-578/core/src/main/thrift/tabletserver.thrift
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-578/core/src/main/thrift/tabletserver.thrift?rev=1344396&r1=1344395&r2=1344396&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-578/core/src/main/thrift/tabletserver.thrift (original)
+++ accumulo/branches/ACCUMULO-578/core/src/main/thrift/tabletserver.thrift Wed May 30 18:34:43 2012
@@ -155,7 +155,6 @@ service TabletClientService extends clie
   oneway void fastHalt(3:cloudtrace.TInfo tinfo, 1:security.AuthInfo credentials, 2:string lock);
   
   list<ActiveScan> getActiveScans(2:cloudtrace.TInfo tinfo, 1:security.AuthInfo credentials) throws (1:security.ThriftSecurityException sec)
-  double sortLog(1:cloudtrace.TInfo tinfo, 2:security.AuthInfo credentials, 3:string lock, 4:string path) throws (1:security.ThriftSecurityException sec);
   oneway void removeLogs(1:cloudtrace.TInfo tinfo, 2:security.AuthInfo credentials, 3:list<string> filenames)
 }
 

Modified: accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/gc/GarbageCollectWriteAheadLogs.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/gc/GarbageCollectWriteAheadLogs.java?rev=1344396&r1=1344395&r2=1344396&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/gc/GarbageCollectWriteAheadLogs.java (original)
+++ accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/gc/GarbageCollectWriteAheadLogs.java Wed May 30 18:34:43 2012
@@ -121,6 +121,7 @@ public class GarbageCollectWriteAheadLog
         try {
           tserver = ThriftUtil.getClient(new TabletClientService.Client.Factory(), address, conf);
           tserver.removeLogs(null, SecurityConstants.getSystemCredentials(), entry.getValue());
+          log.debug("deleted " + entry.getValue() + " from " + entry.getKey());
           status.currentLog.deleted += entry.getValue().size();
         } catch (TException e) {
           log.warn("Error talking to " + address + ": " + e);

Modified: accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/master/Master.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/master/Master.java?rev=1344396&r1=1344395&r2=1344396&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/master/Master.java (original)
+++ accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/master/Master.java Wed May 30 18:34:43 2012
@@ -87,7 +87,6 @@ import org.apache.accumulo.core.util.Byt
 import org.apache.accumulo.core.util.CachedConfiguration;
 import org.apache.accumulo.core.util.ColumnFQ;
 import org.apache.accumulo.core.util.Daemon;
-import org.apache.accumulo.core.util.LoggingRunnable;
 import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.core.zookeeper.ZooUtil;
 import org.apache.accumulo.core.zookeeper.ZooUtil.NodeExistsPolicy;
@@ -98,11 +97,10 @@ import org.apache.accumulo.server.conf.S
 import org.apache.accumulo.server.fate.Fate;
 import org.apache.accumulo.server.fate.TStore.TStatus;
 import org.apache.accumulo.server.iterators.MetadataBulkLoadFilter;
-import org.apache.accumulo.server.master.CoordinateRecoveryTask.JobComplete;
-import org.apache.accumulo.server.master.CoordinateRecoveryTask.LogFile;
 import org.apache.accumulo.server.master.LiveTServerSet.TServerConnection;
 import org.apache.accumulo.server.master.balancer.DefaultLoadBalancer;
 import org.apache.accumulo.server.master.balancer.TabletBalancer;
+import org.apache.accumulo.server.master.recovery.RecoverLease;
 import org.apache.accumulo.server.master.state.Assignment;
 import org.apache.accumulo.server.master.state.CurrentState;
 import org.apache.accumulo.server.master.state.DeadServerList;
@@ -140,7 +138,6 @@ import org.apache.accumulo.server.securi
 import org.apache.accumulo.server.security.SecurityUtil;
 import org.apache.accumulo.server.security.ZKAuthenticator;
 import org.apache.accumulo.server.tabletserver.TabletTime;
-import org.apache.accumulo.server.tabletserver.log.DfsLogger.ServerConfig;
 import org.apache.accumulo.server.trace.TraceFileSystem;
 import org.apache.accumulo.server.util.AddressUtil;
 import org.apache.accumulo.server.util.DefaultMap;
@@ -170,6 +167,8 @@ import org.apache.thrift.server.TServer;
 import org.apache.thrift.transport.TTransportException;
 import org.apache.zookeeper.KeeperException;
 import org.apache.zookeeper.KeeperException.NoNodeException;
+import org.apache.zookeeper.WatchedEvent;
+import org.apache.zookeeper.Watcher;
 import org.apache.zookeeper.ZooDefs;
 import org.apache.zookeeper.data.ACL;
 import org.apache.zookeeper.data.Stat;
@@ -180,7 +179,7 @@ import org.apache.zookeeper.data.Stat;
  * 
  * The master will also coordinate log recoveries and reports general status.
  */
-public class Master implements LiveTServerSet.Listener, TableObserver, CurrentState, JobComplete {
+public class Master implements LiveTServerSet.Listener, TableObserver, CurrentState {
   
   final private static Logger log = Logger.getLogger(Master.class);
   
@@ -209,7 +208,6 @@ public class Master implements LiveTServ
   
   private ZooLock masterLock = null;
   private TServer clientService = null;
-  private CoordinateRecoveryTask recovery = null;
   private TabletBalancer tabletBalancer;
   
   private MasterState state = MasterState.INITIAL;
@@ -698,7 +696,6 @@ public class Master implements LiveTServ
     @Override
     public MasterMonitorInfo getMasterStats(TInfo info, AuthInfo credentials) throws ThriftSecurityException, TException {
       final MasterMonitorInfo result = new MasterMonitorInfo();
-      result.recovery = recovery.status();
       
       result.tServerInfo = new ArrayList<TabletServerStatus>();
       result.tableMap = new DefaultMap<String,TableInfo>(new TableInfo());
@@ -1068,6 +1065,7 @@ public class Master implements LiveTServ
       fate.delete(opid);
       
     }
+    
   }
   
   public MergeInfo getMergeInfo(Text tableId) {
@@ -1352,9 +1350,8 @@ public class Master implements LiveTServ
             
             if (goal == TabletGoalState.HOSTED) {
               if (state != TabletState.HOSTED && !tls.walogs.isEmpty()) {
-                if (!recovery.recover(getServerConfig(), tls.extent, tls.walogs, Master.this)) {
+                if (recoverLogs(tls.walogs))
                   continue;
-                }
               }
               switch (state) {
                 case HOSTED:
@@ -1442,28 +1439,6 @@ public class Master implements LiveTServ
       }
     }
     
-    /**
-     * @return
-     */
-    private ServerConfig getServerConfig() {
-      return new ServerConfig() {
-        @Override
-        public AccumuloConfiguration getConfiguration() {
-          return getSystemConfiguration();
-        }
-
-        @Override
-        public FileSystem getFileSystem() {
-          return fs;
-        }
-
-        @Override
-        public Set<TServerInstance> getCurrentTServers() {
-          return Master.this.tserverSet.getCurrentServers();
-        }
-      };
-    }
-
     private void sendSplitRequest(MergeInfo info, TabletState state, TabletLocationState tls) {
       // Already split?
       if (!info.getState().equals(MergeState.SPLITTING))
@@ -2051,6 +2026,31 @@ public class Master implements LiveTServ
     return result;
   }
   
+  public boolean recoverLogs(Collection<Collection<String>> walogs) throws IOException {
+    boolean recoveryNeeded = false;
+    for (Collection<String> logs : walogs) {
+      for (String log : logs) {
+        String parts[] = log.split("/");
+        String host = parts[0];
+        String filename = parts[1];
+        if (fs.exists(new Path(Constants.getRecoveryDir(getSystemConfiguration()) + "/" + filename + "/finished"))) {
+          continue;
+        }
+        recoveryNeeded = true;
+        String zPath = ZooUtil.getRoot(instance) + Constants.ZRECOVERY + "/" + filename;
+        try {
+          if (!ZooReaderWriter.getInstance().exists(zPath)) {
+            long tid = fate.startTransaction();
+            fate.seedTransaction(tid, new RecoverLease(host, filename), true);
+          }
+        } catch (Exception ex) {
+          Master.log.info("Unable to check the recovery entry " + filename + ", will retry");
+        }
+      }
+    }
+    return recoveryNeeded;
+  }
+
   public void run() throws IOException, InterruptedException, KeeperException {
     final String zroot = ZooUtil.getRoot(instance);
     
@@ -2058,10 +2058,6 @@ public class Master implements LiveTServ
     
     TableManager.getInstance().addObserver(this);
     
-    recovery = new CoordinateRecoveryTask(fs, getSystemConfiguration());
-    Thread recoveryThread = new Daemon(new LoggingRunnable(log, recovery), "Recovery Status");
-    recoveryThread.start();
-    
     StatusThread statusThread = new StatusThread();
     statusThread.start();
     
@@ -2069,6 +2065,13 @@ public class Master implements LiveTServ
     migrationCleanupThread.start();
     
     tserverSet.startListeningForTabletServerChanges();
+
+    ZooReaderWriter.getInstance().getChildren(zroot + Constants.ZRECOVERY, new Watcher() {
+      @Override
+      public void process(WatchedEvent event) {
+        nextEvent.event("Noticed recovery changes", event.getType());
+      }
+    });
     
     AuthInfo systemAuths = SecurityConstants.getSystemCredentials();
     final TabletStateStore stores[] = {new ZooTabletStateStore(new ZooStore(zroot)), new RootTabletStateStore(instance, systemAuths, this),
@@ -2104,9 +2107,6 @@ public class Master implements LiveTServ
     final long deadline = System.currentTimeMillis() + MAX_CLEANUP_WAIT_TIME;
     statusThread.join(remaining(deadline));
     
-    recovery.stop();
-    recoveryThread.join(remaining(deadline));
-    
     // quit, even if the tablet servers somehow jam up and the watchers
     // don't stop
     for (TabletGroupWatcher watcher : watchers) {
@@ -2259,11 +2259,6 @@ public class Master implements LiveTServ
     return result;
   }
   
-  @Override
-  public void finished(LogFile entry) {
-    nextEvent.event("Log recovery %s complete ", entry);
-  }
-  
   public void killTServer(TServerInstance server) {
     nextEvent.event("Forcing server down %s", server);
     serversToShutdown.add(server);

Added: accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/master/recovery/RecoverLease.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/master/recovery/RecoverLease.java?rev=1344396&view=auto
==============================================================================
--- accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/master/recovery/RecoverLease.java (added)
+++ accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/master/recovery/RecoverLease.java Wed May 30 18:34:43 2012
@@ -0,0 +1,92 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.accumulo.server.master.recovery;
+
+import java.io.IOException;
+
+import org.apache.accumulo.core.Constants;
+import org.apache.accumulo.server.fate.Repo;
+import org.apache.accumulo.server.master.Master;
+import org.apache.accumulo.server.master.tableOps.MasterRepo;
+import org.apache.accumulo.server.trace.TraceFileSystem;
+import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.hdfs.DistributedFileSystem;
+
+
+public class RecoverLease extends MasterRepo {
+  
+  private static final long serialVersionUID = 1L;
+
+  private String server;
+  private String file;
+
+  public RecoverLease(String server, String file) {
+    this.server = server;
+    this.file = file;
+  }
+  
+  public static Path getSource(Master master, String server, String file) {
+    String source = Constants.getWalDirectory(master.getSystemConfiguration()) + "/" + server + "/" + file;
+    if (server.contains(":")) {
+      // old-style logger log, copied from local file systems by tservers, unsorted into the wal base dir
+      source = Constants.getWalDirectory(master.getSystemConfiguration()) + "/" + file;
+    }
+    return new Path(source);
+  }
+  
+  public Path getSource(Master master) {
+    return getSource(master, server, file);
+  }
+
+  @Override
+  public long isReady(long tid, Master master) throws Exception {
+    FileSystem fs = master.getFileSystem();
+    if (fs.exists(getSource(master)))
+      return 0;
+    log.warn("Unable to locate file " + file + " wal for server " + server);
+    return 1000;
+  }
+
+  @Override
+  public Repo<Master> call(long tid, Master master) throws Exception {
+    Path source = getSource(master);
+    FileSystem fs = master.getFileSystem();
+    if (fs instanceof TraceFileSystem)
+      fs = ((TraceFileSystem) fs).getImplementation();
+    try {
+      if (fs instanceof DistributedFileSystem) {
+        DistributedFileSystem dfs = (DistributedFileSystem) fs;
+        dfs.recoverLease(source);
+        log.info("Recovered lease on " + source.toString());
+        return new SubmitFileForRecovery(server, file);
+      }
+    } catch (IOException ex) {
+      log.error("error recovering lease ", ex);
+    }
+    try {
+      fs.append(source).close();
+      log.info("Recovered lease on " + source.toString() + " using append");
+
+    } catch (IOException ex) {
+      log.error("error recovering lease using append", ex);
+    }
+    // lets do this again
+    return new RecoverLease(server, file);
+  }
+  
+}

Propchange: accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/master/recovery/RecoverLease.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/master/recovery/SubmitFileForRecovery.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/master/recovery/SubmitFileForRecovery.java?rev=1344396&view=auto
==============================================================================
--- accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/master/recovery/SubmitFileForRecovery.java (added)
+++ accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/master/recovery/SubmitFileForRecovery.java Wed May 30 18:34:43 2012
@@ -0,0 +1,78 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.accumulo.server.master.recovery;
+
+import java.io.IOException;
+
+import org.apache.accumulo.core.Constants;
+import org.apache.accumulo.core.zookeeper.ZooUtil;
+import org.apache.accumulo.core.zookeeper.ZooUtil.NodeExistsPolicy;
+import org.apache.accumulo.server.fate.Repo;
+import org.apache.accumulo.server.master.Master;
+import org.apache.accumulo.server.master.tableOps.MasterRepo;
+import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
+import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.fs.Path;
+import org.apache.zookeeper.WatchedEvent;
+import org.apache.zookeeper.Watcher;
+
+/**
+ * 
+ */
+public class SubmitFileForRecovery extends MasterRepo implements Repo<Master> {
+  
+  private static final long serialVersionUID = 1L;
+  String server;
+  String file;
+  
+  SubmitFileForRecovery(String server, String file) {
+    this.server = server;
+    this.file = file;
+  }
+
+  @Override
+  public Repo<Master> call(long tid, final Master master) throws Exception {
+    String source = RecoverLease.getSource(master, server, file).toString();
+    ZooReaderWriter zoo = ZooReaderWriter.getInstance();
+    final String path = ZooUtil.getRoot(master.getInstance()) + Constants.ZRECOVERY + "/" + file;
+    zoo.putPersistentData(path, source.getBytes(), NodeExistsPolicy.SKIP);
+    log.info("Created zookeeper entry " + path + " with data " + source);
+    zoo.exists(path, new Watcher() {
+      @Override
+      public void process(WatchedEvent event) {
+        switch (event.getType()) {
+          case NodeDataChanged:
+            log.info("noticed recovery entry for " + file + " was removed");
+            FileSystem fs = master.getFileSystem();
+            Path finished = new Path(Constants.getRecoveryDir(master.getSystemConfiguration()), "finished");
+            try {
+              if (fs.exists(finished))
+                log.info("log recovery for " + file + " successful");
+              else
+                log.error("zookeeper recovery entry " + path + " has been removed, but the finish flag file is missing");
+            } catch (IOException ex) {
+              log.error("Unable to check on the recovery status of " + file, ex);
+            }
+            break;
+        }
+      }
+      
+    });
+    return null;
+  }
+  
+}

Propchange: accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/master/recovery/SubmitFileForRecovery.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/monitor/Monitor.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/monitor/Monitor.java?rev=1344396&r1=1344395&r2=1344396&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/monitor/Monitor.java (original)
+++ accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/monitor/Monitor.java Wed May 30 18:34:43 2012
@@ -363,7 +363,6 @@ public class Monitor {
       
       ingestRateOverTime.add(new Pair<Long,Double>(currentTime, totalIngestRate));
       ingestByteRateOverTime.add(new Pair<Long,Double>(currentTime, totalIngestByteRate));
-      recoveriesOverTime.add(new Pair<Long,Integer>(currentTime, mmi.recovery.size()));
       
       double totalLoad = 0.;
       for (TabletServerStatus status : mmi.tServerInfo) {

Modified: accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/monitor/servlets/MasterServlet.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/monitor/servlets/MasterServlet.java?rev=1344396&r1=1344395&r2=1344396&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/monitor/servlets/MasterServlet.java (original)
+++ accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/monitor/servlets/MasterServlet.java Wed May 30 18:34:43 2012
@@ -173,25 +173,28 @@ public class MasterServlet extends Basic
   private void doRecoveryList(HttpServletRequest req, StringBuilder sb) {
     MasterMonitorInfo mmi = Monitor.getMmi();
     if (mmi != null) {
-      List<RecoveryStatus> jobs = mmi.recovery;
-      if (jobs != null && jobs.size() > 0) {
-        Table recoveryTable = new Table("logRecovery", "Log&nbsp;Recovery");
-        recoveryTable.setSubCaption("Some tablets were unloaded in an unsafe manner. Write-ahead logs are being recovered.");
-        recoveryTable.addSortableColumn("Server");
-        recoveryTable.addSortableColumn("Log");
-        recoveryTable.addSortableColumn("Time", new DurationType(), null);
-        recoveryTable.addSortableColumn("Copy/Sort", new ProgressChartType(), null);
-        
-        for (RecoveryStatus recovery : jobs) {
-          TableRow row = recoveryTable.prepareRow();
-          row.add(AddressUtil.parseAddress(recovery.host, Property.TSERV_CLIENTPORT).getHostName());
-          row.add(recovery.name);
-          row.add((long) recovery.runtime);
-          row.add(recovery.copyProgress);
-          recoveryTable.addRow(row);
+      Table recoveryTable = new Table("logRecovery", "Log&nbsp;Recovery");
+      recoveryTable.setSubCaption("Some tablets were unloaded in an unsafe manner. Write-ahead logs are being recovered.");
+      recoveryTable.addSortableColumn("Server");
+      recoveryTable.addSortableColumn("Log");
+      recoveryTable.addSortableColumn("Time", new DurationType(), null);
+      recoveryTable.addSortableColumn("Copy/Sort", new ProgressChartType(), null);
+      int rows = 0;
+      for (TabletServerStatus server : mmi.tServerInfo) {
+        if (server.logSorts != null) {
+          for (RecoveryStatus recovery : server.logSorts) {
+            TableRow row = recoveryTable.prepareRow();
+            row.add(AddressUtil.parseAddress(server.name, Property.TSERV_CLIENTPORT).getHostName());
+            row.add(recovery.name);
+            row.add((long) recovery.runtime);
+            row.add(recovery.progress);
+            recoveryTable.addRow(row);
+            rows++;
+          }
         }
-        recoveryTable.generate(req, sb);
       }
+      if (rows > 0)
+        recoveryTable.generate(req, sb);
     }
   }
   

Modified: accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java?rev=1344396&r1=1344395&r2=1344396&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java (original)
+++ accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java Wed May 30 18:34:43 2012
@@ -112,7 +112,6 @@ import org.apache.accumulo.server.tablet
 import org.apache.accumulo.server.tabletserver.TabletServerResourceManager.TabletResourceManager;
 import org.apache.accumulo.server.tabletserver.TabletStatsKeeper.Operation;
 import org.apache.accumulo.server.tabletserver.log.DfsLogger;
-import org.apache.accumulo.server.tabletserver.log.IRemoteLogger;
 import org.apache.accumulo.server.tabletserver.log.MutationReceiver;
 import org.apache.accumulo.server.tabletserver.mastermessage.TabletStatusMessage;
 import org.apache.accumulo.server.tabletserver.metrics.TabletServerMinCMetrics;
@@ -210,7 +209,7 @@ public class Tablet {
       return Tablet.this;
     }
     
-    public boolean beginUpdatingLogsUsed(ArrayList<IRemoteLogger> copy, boolean mincFinish) {
+    public boolean beginUpdatingLogsUsed(ArrayList<DfsLogger> copy, boolean mincFinish) {
       return Tablet.this.beginUpdatingLogsUsed(memTable, copy, mincFinish);
     }
     
@@ -1179,7 +1178,6 @@ public class Tablet {
       for (int i = 0; i < files.length; i++) {
         paths[i] = files[i].getPath();
       }
-      log.debug("fs " + fs + " files: " + Arrays.toString(paths) + " location: " + location);
       Collection<String> goodPaths = cleanUpFiles(fs, files, location, true);
       for (String path : goodPaths) {
         String filename = new Path(path).getName();
@@ -1461,7 +1459,7 @@ public class Tablet {
         }
       }
       // make some closed references that represent the recovered logs
-      currentLogs = new HashSet<IRemoteLogger>();
+      currentLogs = new HashSet<DfsLogger>();
       for (LogEntry logEntry : logEntries) {
         for (String log : logEntry.logSet) {
           String[] parts = log.split("/", 2);
@@ -2239,7 +2237,7 @@ public class Tablet {
   private synchronized MinorCompactionTask prepareForMinC(long flushId) {
     CommitSession oldCommitSession = tabletMemory.prepareForMinC();
     otherLogs = currentLogs;
-    currentLogs = new HashSet<IRemoteLogger>();
+    currentLogs = new HashSet<DfsLogger>();
     
     String mergeFile = datafileManager.reserveMergingMinorCompactionFile();
     
@@ -3241,12 +3239,8 @@ public class Tablet {
           log.debug("Starting MajC " + extent + " (" + reason + ") " + datafileManager.abs2rel(datafileManager.string2path(copy.keySet())) + " --> "
               + datafileManager.abs2rel(new Path(compactTmpName)));
 
-          Compactor compactor = new Compactor(conf, fs, copy, null, compactTmpName, filesToCompact.size() == 0 ? propogateDeletes : true, // always
-                                                                                                                                          // propagate
-                                                                                                                                          // deletes,
-                                                                                                                                          // unless
-                                                                                                                                          // last
-                                                                                                                                          // batch
+          // always propagate deletes, unless last batch
+          Compactor compactor = new Compactor(conf, fs, copy, null, compactTmpName, filesToCompact.size() == 0 ? propogateDeletes : true,
               acuTableConf, extent, cenv, compactionIterators);
           
           CompactionStats mcs = compactor.call();
@@ -3647,11 +3641,11 @@ public class Tablet {
     }
   }
   
-  private Set<IRemoteLogger> currentLogs = new HashSet<IRemoteLogger>();
+  private Set<DfsLogger> currentLogs = new HashSet<DfsLogger>();
   
   synchronized public Set<String> getCurrentLogs() {
     Set<String> result = new HashSet<String>();
-    for (IRemoteLogger log : currentLogs) {
+    for (DfsLogger log : currentLogs) {
       result.add(log.toString());
     }
     return result;
@@ -3670,12 +3664,12 @@ public class Tablet {
       if (removingLogs)
         throw new IllegalStateException("Attempted to clear logs when removal of logs in progress");
       
-      for (IRemoteLogger logger : otherLogs) {
+      for (DfsLogger logger : otherLogs) {
         otherLogsCopy.add(logger.toString());
         doomed.add(logger.toString());
       }
       
-      for (IRemoteLogger logger : currentLogs) {
+      for (DfsLogger logger : currentLogs) {
         currentLogsCopy.add(logger.toString());
         doomed.remove(logger.toString());
       }
@@ -3703,7 +3697,7 @@ public class Tablet {
     logLock.unlock();
   }
   
-  private Set<IRemoteLogger> otherLogs = Collections.emptySet();
+  private Set<DfsLogger> otherLogs = Collections.emptySet();
   private boolean removingLogs = false;
   
   // this lock is basically used to synchronize writing of log info to !METADATA
@@ -3713,7 +3707,7 @@ public class Tablet {
     return currentLogs.size();
   }
   
-  private boolean beginUpdatingLogsUsed(InMemoryMap memTable, Collection<IRemoteLogger> more, boolean mincFinish) {
+  private boolean beginUpdatingLogsUsed(InMemoryMap memTable, Collection<DfsLogger> more, boolean mincFinish) {
     
     boolean releaseLock = true;
     
@@ -3750,7 +3744,7 @@ public class Tablet {
         
         int numAdded = 0;
         int numContained = 0;
-        for (IRemoteLogger logger : more) {
+        for (DfsLogger logger : more) {
           if (addToOther) {
             if (otherLogs.add(logger))
               numAdded++;

Modified: accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java?rev=1344396&r1=1344395&r2=1344396&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java (original)
+++ accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java Wed May 30 18:34:43 2012
@@ -162,7 +162,6 @@ import org.apache.accumulo.server.tablet
 import org.apache.accumulo.server.tabletserver.TabletServerResourceManager.TabletResourceManager;
 import org.apache.accumulo.server.tabletserver.TabletStatsKeeper.Operation;
 import org.apache.accumulo.server.tabletserver.log.DfsLogger;
-import org.apache.accumulo.server.tabletserver.log.IRemoteLogger;
 import org.apache.accumulo.server.tabletserver.log.LogSorter;
 import org.apache.accumulo.server.tabletserver.log.MutationReceiver;
 import org.apache.accumulo.server.tabletserver.log.TabletServerLogger;
@@ -224,14 +223,14 @@ public class TabletServer extends Abstra
   protected TabletServerMinCMetrics mincMetrics = new TabletServerMinCMetrics();
   
   private ServerConfiguration serverConfig;
-  private final LogSorter logSorter;
+  private LogSorter logSorter = null;
   
   public TabletServer(ServerConfiguration conf, FileSystem fs) {
     super();
     this.serverConfig = conf;
     this.instance = conf.getInstance();
     this.fs = TraceFileSystem.wrap(fs);
-    this.logSorter = new LogSorter(fs, conf.getConfiguration());
+    this.logSorter = new LogSorter(instance, fs, getSystemConfiguration());
     SimpleTimer.getInstance().schedule(new TimerTask() {
       @Override
       public void run() {
@@ -2043,27 +2042,6 @@ public class TabletServer extends Abstra
     /*
      * (non-Javadoc)
      * 
-     * @see org.apache.accumulo.core.tabletserver.thrift.TabletClientService.Iface#sortLog(org.apache.accumulo.cloudtrace.thrift.TInfo,
-     * org.apache.accumulo.core.security.thrift.AuthInfo, java.lang.String)
-     */
-    @Override
-    public double sortLog(TInfo tinfo, AuthInfo credentials, String source, String dest) throws ThriftSecurityException, TException {
-      try {
-        if (!authenticator.hasSystemPermission(credentials, credentials.user, SystemPermission.SYSTEM))
-          throw new ThriftSecurityException(credentials.user, SecurityErrorCode.PERMISSION_DENIED);
-      } catch (Exception e) {
-        throw new RuntimeException(e);
-      }
-      try {
-        return logSorter.sort(source, dest);
-      } catch (IOException ex) {
-        throw new RuntimeException(ex);
-      }
-    }
-    
-    /*
-     * (non-Javadoc)
-     * 
      * @see org.apache.accumulo.core.tabletserver.thrift.TabletClientService.Iface#removeLogs(org.apache.accumulo.cloudtrace.thrift.TInfo,
      * org.apache.accumulo.core.security.thrift.AuthInfo, java.util.List)
      */
@@ -2077,6 +2055,7 @@ public class TabletServer extends Abstra
       nextFile:
       for (String filename : filenames) {
         for (String logger : loggers) {
+          log.debug("logger " + logger + " filename " + filename);
           if (logger.contains(filename))
             continue nextFile;
         }
@@ -2099,6 +2078,8 @@ public class TabletServer extends Abstra
           } else {
             log.info("Deleting walog " + filename);
             fs.delete(new Path(logDir, filename), true);
+            log.info("Deleting any recovery version of the log ");
+            fs.delete(new Path(Constants.getRecoveryDir(acuConf), filename), true);
           }
         } catch (IOException e) {
           log.warn("Error attempting to delete write-ahead log " + filename + ": " + e);
@@ -2590,12 +2571,12 @@ public class TabletServer extends Abstra
     return statsKeeper;
   }
   
-  public void addLoggersToMetadata(List<IRemoteLogger> logs, KeyExtent extent, int id) {
+  public void addLoggersToMetadata(List<DfsLogger> logs, KeyExtent extent, int id) {
     log.info("Adding " + logs.size() + " logs for extent " + extent + " as alias " + id);
     
     long now = RelativeTime.currentTimeMillis();
     List<String> logSet = new ArrayList<String>();
-    for (IRemoteLogger log : logs)
+    for (DfsLogger log : logs)
       logSet.add(log.toString());
     MetadataTable.LogEntry entry = new MetadataTable.LogEntry();
     entry.extent = extent;
@@ -2719,6 +2700,12 @@ public class TabletServer extends Abstra
     }
     clientAddress = new InetSocketAddress(clientAddress.getAddress(), clientPort);
     announceExistence();
+    try {
+      logSorter.startWatchingForRecoveryLogs(getClientAddressString());
+    } catch (Exception ex) {
+      log.error("Error setting watches for recoveries");
+      throw new RuntimeException(ex);
+    }
     
     try {
       OBJECT_NAME = new ObjectName("accumulo.server.metrics:service=TServerInfo,name=TabletServerMBean,instance=" + Thread.currentThread().getName());
@@ -3113,6 +3100,7 @@ public class TabletServer extends Abstra
     result.indexCacheRequest = resourceManager.getIndexCache().getStats().getRequestCount();
     result.dataCacheHits = resourceManager.getDataCache().getStats().getHitCount();
     result.dataCacheRequest = resourceManager.getDataCache().getStats().getRequestCount();
+    result.logSorts = logSorter.getLogSorts();
     return result;
   }
   
@@ -3392,8 +3380,8 @@ public class TabletServer extends Abstra
   public TableConfiguration getTableConfiguration(KeyExtent extent) {
     return ServerConfiguration.getTableConfiguration(instance, extent.getTableId().toString());
   }
-  public DfsLogger.ServerConfig getServerConfig() {
-    return new DfsLogger.ServerConfig() {
+  public DfsLogger.ServerResources getServerConfig() {
+    return new DfsLogger.ServerResources() {
       
       @Override
       public FileSystem getFileSystem() {

Modified: accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/tabletserver/log/DfsLogger.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/tabletserver/log/DfsLogger.java?rev=1344396&r1=1344395&r2=1344396&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/tabletserver/log/DfsLogger.java (original)
+++ accumulo/branches/ACCUMULO-578/server/src/main/java/org/apache/accumulo/server/tabletserver/log/DfsLogger.java Wed May 30 18:34:43 2012
@@ -27,7 +27,6 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
-import java.util.Random;
 import java.util.Set;
 import java.util.UUID;
 import java.util.concurrent.CountDownLatch;
@@ -38,15 +37,12 @@ import org.apache.accumulo.core.conf.Acc
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.data.KeyExtent;
 import org.apache.accumulo.core.data.Mutation;
-import org.apache.accumulo.core.tabletserver.thrift.TabletClientService.Iface;
 import org.apache.accumulo.core.tabletserver.thrift.TabletMutations;
 import org.apache.accumulo.core.util.Daemon;
 import org.apache.accumulo.core.util.StringUtil;
-import org.apache.accumulo.core.util.ThriftUtil;
 import org.apache.accumulo.server.logger.LogFileKey;
 import org.apache.accumulo.server.logger.LogFileValue;
 import org.apache.accumulo.server.master.state.TServerInstance;
-import org.apache.accumulo.server.security.SecurityConstants;
 import org.apache.hadoop.fs.FSDataOutputStream;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
@@ -56,10 +52,10 @@ import org.apache.log4j.Logger;
  * Wrap a connection to a logger.
  * 
  */
-public class DfsLogger implements IRemoteLogger {
+public class DfsLogger {
   private static Logger log = Logger.getLogger(DfsLogger.class);
   
-  public interface ServerConfig {
+  public interface ServerResources {
     AccumuloConfiguration getConfiguration();
     
     FileSystem getFileSystem();
@@ -171,8 +167,8 @@ public class DfsLogger implements IRemot
     // filename is unique
     if (obj == null)
       return false;
-    if (obj instanceof IRemoteLogger)
-      return getFileName().equals(((IRemoteLogger) obj).getFileName());
+    if (obj instanceof DfsLogger)
+      return getFileName().equals(((DfsLogger) obj).getFileName());
     return false;
   }
   
@@ -185,16 +181,16 @@ public class DfsLogger implements IRemot
     return getFileName().hashCode();
   }
   
-  private ServerConfig conf;
+  private ServerResources conf;
   private FSDataOutputStream logFile;
   private Path logPath;
   private String logger;
   
-  public DfsLogger(ServerConfig conf) throws IOException {
+  public DfsLogger(ServerResources conf) throws IOException {
     this.conf = conf;
   }
   
-  public DfsLogger(ServerConfig conf, String logger, String filename) throws IOException {
+  public DfsLogger(ServerResources conf, String logger, String filename) throws IOException {
     this.conf = conf;
     this.logger = logger;
     this.logPath = new Path(Constants.getWalDirectory(conf.getConfiguration()), filename);
@@ -243,26 +239,14 @@ public class DfsLogger implements IRemot
     return getLogger() + "/" + getFileName();
   }
   
-  /* (non-Javadoc)
-   * @see org.apache.accumulo.server.tabletserver.log.IRemoteLogger#getLogger()
-   */
-  @Override
   public String getLogger() {
     return logger;
   }
   
-  /* (non-Javadoc)
-   * @see org.apache.accumulo.server.tabletserver.log.IRemoteLogger#getFileName()
-   */
-  @Override
   public String getFileName() {
     return logPath.getName();
   }
   
-  /* (non-Javadoc)
-   * @see org.apache.accumulo.server.tabletserver.log.IRemoteLogger#close()
-   */
-  @Override
   public void close() throws IOException {
     
     synchronized (closeLock) {
@@ -292,10 +276,6 @@ public class DfsLogger implements IRemot
       }
   }
   
-  /* (non-Javadoc)
-   * @see org.apache.accumulo.server.tabletserver.log.IRemoteLogger#defineTablet(int, int, org.apache.accumulo.core.data.KeyExtent)
-   */
-  @Override
   public synchronized void defineTablet(int seq, int tid, KeyExtent tablet) throws IOException {
     // write this log to the METADATA table
     final LogFileKey key = new LogFileKey();
@@ -305,7 +285,6 @@ public class DfsLogger implements IRemot
     key.tablet = tablet;
     try {
       write(key, EMPTY);
-      logFile.flush();
       logFile.sync();
     } catch (IOException ex) {
       log.error(ex);
@@ -323,18 +302,10 @@ public class DfsLogger implements IRemot
     value.write(logFile);
   }
 
-  /* (non-Javadoc)
-   * @see org.apache.accumulo.server.tabletserver.log.IRemoteLogger#log(int, int, org.apache.accumulo.core.data.Mutation)
-   */
-  @Override
   public LoggerOperation log(int seq, int tid, Mutation mutation) throws IOException {
     return logManyTablets(Collections.singletonList(new TabletMutations(tid, seq, Collections.singletonList(mutation.toThrift()))));
   }
   
-  /* (non-Javadoc)
-   * @see org.apache.accumulo.server.tabletserver.log.IRemoteLogger#logManyTablets(java.util.List)
-   */
-  @Override
   public LoggerOperation logManyTablets(List<TabletMutations> mutations) throws IOException {
     DfsLogger.LogWork work = new DfsLogger.LogWork(mutations, new CountDownLatch(1));
     
@@ -370,10 +341,6 @@ public class DfsLogger implements IRemot
     return new LoggerOperation(work);
   }
   
-  /* (non-Javadoc)
-   * @see org.apache.accumulo.server.tabletserver.log.IRemoteLogger#minorCompactionFinished(int, int, java.lang.String)
-   */
-  @Override
   public synchronized void minorCompactionFinished(int seq, int tid, String fqfn) throws IOException {
     LogFileKey key = new LogFileKey();
     key.event = COMPACTION_FINISH;
@@ -387,10 +354,6 @@ public class DfsLogger implements IRemot
     }
   }
   
-  /* (non-Javadoc)
-   * @see org.apache.accumulo.server.tabletserver.log.IRemoteLogger#minorCompactionStarted(int, int, java.lang.String)
-   */
-  @Override
   public synchronized void minorCompactionStarted(int seq, int tid, String fqfn) throws IOException {
     LogFileKey key = new LogFileKey();
     key.event = COMPACTION_START;
@@ -405,45 +368,4 @@ public class DfsLogger implements IRemot
     }
   }
   
-  /* (non-Javadoc)
-   * @see org.apache.accumulo.server.tabletserver.log.IRemoteLogger#startCopy(java.lang.String, java.lang.String)
-   */
-  @Override
-  public synchronized double startCopy(String source, String dest) throws IOException {
-    Iface client = null;
-    try {
-      Set<TServerInstance> current = conf.getCurrentTServers();
-      if (current.isEmpty())
-        throw new RuntimeException("No servers for recovery");
-      Random random = new Random();
-      int choice = random.nextInt(current.size());
-      TServerInstance instance = current.toArray(new TServerInstance[] {})[choice];
-      try {
-        client = ThriftUtil.getTServerClient(instance.hostPort(), conf.getConfiguration());
-        log.info("Asking " + instance.hostPort() + " to copy/sort from " + source + " to " + dest);
-        return client.sortLog(null, SecurityConstants.getSystemCredentials(), source, dest);
-      } catch (Exception ex) {
-        throw new IOException(ex);
-      }
-    } finally {
-      if (client != null)
-        ThriftUtil.returnClient(client);
-    }
-  }
-  
-  /* (non-Javadoc)
-   * @see org.apache.accumulo.server.tabletserver.log.IRemoteLogger#getClosedLogs()
-   */
-  @Override
-  public synchronized List<String> getClosedLogs() throws IOException {
-    return Collections.emptyList();
-  }
-  
-  /* (non-Javadoc)
-   * @see org.apache.accumulo.server.tabletserver.log.IRemoteLogger#removeFile(java.util.List)
-   */
-  @Override
-  public synchronized void removeFile(List<String> files) throws IOException {
-  }
-  
 }



Mime
View raw message