Browse Source

HDFS-12138. Remove redundant 'public' modifiers from BlockCollection. Contributed by Chen Liang

Tsz-Wo Nicholas Sze 8 năm trước cách đây
mục cha
commit
ed27f2b2cc

+ 11 - 11
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockCollection.java

@@ -32,62 +32,62 @@ public interface BlockCollection {
   /**
   /**
    * Get the last block of the collection.
    * Get the last block of the collection.
    */
    */
-  public BlockInfo getLastBlock();
+  BlockInfo getLastBlock();
 
 
   /** 
   /** 
    * Get content summary.
    * Get content summary.
    */
    */
-  public ContentSummary computeContentSummary(BlockStoragePolicySuite bsps)
+  ContentSummary computeContentSummary(BlockStoragePolicySuite bsps)
       throws AccessControlException;
       throws AccessControlException;
 
 
   /**
   /**
    * @return the number of blocks or block groups
    * @return the number of blocks or block groups
    */ 
    */ 
-  public int numBlocks();
+  int numBlocks();
 
 
   /**
   /**
    * Get the blocks (striped or contiguous).
    * Get the blocks (striped or contiguous).
    */
    */
-  public BlockInfo[] getBlocks();
+  BlockInfo[] getBlocks();
 
 
   /**
   /**
    * Get preferred block size for the collection 
    * Get preferred block size for the collection 
    * @return preferred block size in bytes
    * @return preferred block size in bytes
    */
    */
-  public long getPreferredBlockSize();
+  long getPreferredBlockSize();
 
 
   /**
   /**
    * Get block replication for the collection.
    * Get block replication for the collection.
    * @return block replication value. Return 0 if the file is erasure coded.
    * @return block replication value. Return 0 if the file is erasure coded.
    */
    */
-  public short getPreferredBlockReplication();
+  short getPreferredBlockReplication();
 
 
   /**
   /**
    * @return the storage policy ID.
    * @return the storage policy ID.
    */
    */
-  public byte getStoragePolicyID();
+  byte getStoragePolicyID();
 
 
   /**
   /**
    * Get the name of the collection.
    * Get the name of the collection.
    */
    */
-  public String getName();
+  String getName();
 
 
   /**
   /**
    * Set the block (contiguous or striped) at the given index.
    * Set the block (contiguous or striped) at the given index.
    */
    */
-  public void setBlock(int index, BlockInfo blk);
+  void setBlock(int index, BlockInfo blk);
 
 
   /**
   /**
    * Convert the last block of the collection to an under-construction block
    * Convert the last block of the collection to an under-construction block
    * and set the locations.
    * and set the locations.
    */
    */
-  public void convertLastBlockToUC(BlockInfo lastBlock,
+  void convertLastBlockToUC(BlockInfo lastBlock,
       DatanodeStorageInfo[] targets) throws IOException;
       DatanodeStorageInfo[] targets) throws IOException;
 
 
   /**
   /**
    * @return whether the block collection is under construction.
    * @return whether the block collection is under construction.
    */
    */
-  public boolean isUnderConstruction();
+  boolean isUnderConstruction();
 
 
   /**
   /**
    * @return whether the block collection is in striping format
    * @return whether the block collection is in striping format