[1/2] hadoop git commit: HDFS-8237. Move all protocol classes used by ClientProtocol to hdfs-client. Contributed by Haohui Mai.

2015-05-04 Thread wheat9
Repository: hadoop
Updated Branches:
  refs/heads/trunk bf70c5ae2 - 0d6aa5d60


http://git-wip-us.apache.org/repos/asf/hadoop/blob/0d6aa5d6/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/CacheDirectiveInfo.java
--
diff --git 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/CacheDirectiveInfo.java
 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/CacheDirectiveInfo.java
deleted file mode 100644
index f6b3c34..000
--- 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/CacheDirectiveInfo.java
+++ /dev/null
@@ -1,358 +0,0 @@
-/**
- * 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.hadoop.hdfs.protocol;
-
-import java.util.Date;
-
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.hadoop.classification.InterfaceAudience;
-import org.apache.hadoop.classification.InterfaceStability;
-import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.hdfs.DFSUtil;
-
-import com.google.common.base.Preconditions;
-
-/**
- * Describes a path-based cache directive.
- */
-@InterfaceStability.Evolving
-@InterfaceAudience.Public
-public class CacheDirectiveInfo {
-  /**
-   * A builder for creating new CacheDirectiveInfo instances.
-   */
-  public static class Builder {
-private Long id;
-private Path path;
-private Short replication;
-private String pool;
-private Expiration expiration;
-
-/**
- * Builds a new CacheDirectiveInfo populated with the set properties.
- * 
- * @return New CacheDirectiveInfo.
- */
-public CacheDirectiveInfo build() {
-  return new CacheDirectiveInfo(id, path, replication, pool, expiration);
-}
-
-/**
- * Creates an empty builder.
- */
-public Builder() {
-}
-
-/**
- * Creates a builder with all elements set to the same values as the
- * given CacheDirectiveInfo.
- */
-public Builder(CacheDirectiveInfo directive) {
-  this.id = directive.getId();
-  this.path = directive.getPath();
-  this.replication = directive.getReplication();
-  this.pool = directive.getPool();
-  this.expiration = directive.getExpiration();
-}
-
-/**
- * Sets the id used in this request.
- * 
- * @param id The id used in this request.
- * @return This builder, for call chaining.
- */
-public Builder setId(Long id) {
-  this.id = id;
-  return this;
-}
-
-/**
- * Sets the path used in this request.
- * 
- * @param path The path used in this request.
- * @return This builder, for call chaining.
- */
-public Builder setPath(Path path) {
-  this.path = path;
-  return this;
-}
-
-/**
- * Sets the replication used in this request.
- * 
- * @param replication The replication used in this request.
- * @return This builder, for call chaining.
- */
-public Builder setReplication(Short replication) {
-  this.replication = replication;
-  return this;
-}
-
-/**
- * Sets the pool used in this request.
- * 
- * @param pool The pool used in this request.
- * @return This builder, for call chaining.
- */
-public Builder setPool(String pool) {
-  this.pool = pool;
-  return this;
-}
-
-/**
- * Sets when the CacheDirective should expire. A
- * {@link CacheDirectiveInfo.Expiration} can specify either an absolute or
- * relative expiration time.
- * 
- * @param expiration when this CacheDirective should expire
- * @return This builder, for call chaining
- */
-public Builder setExpiration(Expiration expiration) {
-  this.expiration = expiration;
-  return this;
-}
-  }
-
-  /**
-   * Denotes a relative or absolute expiration time for a CacheDirective. Use
-   * factory methods {@link CacheDirectiveInfo.Expiration#newAbsolute(Date)} 
and
-   * {@link CacheDirectiveInfo.Expiration#newRelative(long)} to create an
-   * Expiration.
-   * p
-   * In either case, the server-side clock is used 

[1/2] hadoop git commit: HDFS-8237. Move all protocol classes used by ClientProtocol to hdfs-client. Contributed by Haohui Mai.

2015-05-04 Thread wheat9
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 81f128f29 - db0bd6dca


http://git-wip-us.apache.org/repos/asf/hadoop/blob/db0bd6dc/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/CacheDirectiveInfo.java
--
diff --git 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/CacheDirectiveInfo.java
 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/CacheDirectiveInfo.java
deleted file mode 100644
index f6b3c34..000
--- 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/CacheDirectiveInfo.java
+++ /dev/null
@@ -1,358 +0,0 @@
-/**
- * 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.hadoop.hdfs.protocol;
-
-import java.util.Date;
-
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.hadoop.classification.InterfaceAudience;
-import org.apache.hadoop.classification.InterfaceStability;
-import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.hdfs.DFSUtil;
-
-import com.google.common.base.Preconditions;
-
-/**
- * Describes a path-based cache directive.
- */
-@InterfaceStability.Evolving
-@InterfaceAudience.Public
-public class CacheDirectiveInfo {
-  /**
-   * A builder for creating new CacheDirectiveInfo instances.
-   */
-  public static class Builder {
-private Long id;
-private Path path;
-private Short replication;
-private String pool;
-private Expiration expiration;
-
-/**
- * Builds a new CacheDirectiveInfo populated with the set properties.
- * 
- * @return New CacheDirectiveInfo.
- */
-public CacheDirectiveInfo build() {
-  return new CacheDirectiveInfo(id, path, replication, pool, expiration);
-}
-
-/**
- * Creates an empty builder.
- */
-public Builder() {
-}
-
-/**
- * Creates a builder with all elements set to the same values as the
- * given CacheDirectiveInfo.
- */
-public Builder(CacheDirectiveInfo directive) {
-  this.id = directive.getId();
-  this.path = directive.getPath();
-  this.replication = directive.getReplication();
-  this.pool = directive.getPool();
-  this.expiration = directive.getExpiration();
-}
-
-/**
- * Sets the id used in this request.
- * 
- * @param id The id used in this request.
- * @return This builder, for call chaining.
- */
-public Builder setId(Long id) {
-  this.id = id;
-  return this;
-}
-
-/**
- * Sets the path used in this request.
- * 
- * @param path The path used in this request.
- * @return This builder, for call chaining.
- */
-public Builder setPath(Path path) {
-  this.path = path;
-  return this;
-}
-
-/**
- * Sets the replication used in this request.
- * 
- * @param replication The replication used in this request.
- * @return This builder, for call chaining.
- */
-public Builder setReplication(Short replication) {
-  this.replication = replication;
-  return this;
-}
-
-/**
- * Sets the pool used in this request.
- * 
- * @param pool The pool used in this request.
- * @return This builder, for call chaining.
- */
-public Builder setPool(String pool) {
-  this.pool = pool;
-  return this;
-}
-
-/**
- * Sets when the CacheDirective should expire. A
- * {@link CacheDirectiveInfo.Expiration} can specify either an absolute or
- * relative expiration time.
- * 
- * @param expiration when this CacheDirective should expire
- * @return This builder, for call chaining
- */
-public Builder setExpiration(Expiration expiration) {
-  this.expiration = expiration;
-  return this;
-}
-  }
-
-  /**
-   * Denotes a relative or absolute expiration time for a CacheDirective. Use
-   * factory methods {@link CacheDirectiveInfo.Expiration#newAbsolute(Date)} 
and
-   * {@link CacheDirectiveInfo.Expiration#newRelative(long)} to create an
-   * Expiration.
-   * p
-   * In either case, the server-side clock is