Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-19531

Remove needless volatile declaration

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • None
    • 2.0.0
    • None
    • Reviewed

    Description

      ZKNamespaceManager.java
      public class ZKNamespaceManager extends ZKListener {
        private static final Log LOG = LogFactory.getLog(ZKNamespaceManager.class);
        private final String nsZNode;
        private volatile NavigableMap<String,NamespaceDescriptor> cache; //here
      
      HBaseAdmin.java
      public class HBaseAdmin implements Admin {
        private static final Log LOG = LogFactory.getLog(HBaseAdmin.class);
      
        private ClusterConnection connection;
      
        private volatile Configuration conf; //here
      
      BufferedMutatorImpl.java
      public class BufferedMutatorImpl implements BufferedMutator {
      
        private static final Log LOG = LogFactory.getLog(BufferedMutatorImpl.class);
      
        private final ExceptionListener listener;
      
        private final TableName tableName;
      
        private final Configuration conf;
        private final ConcurrentLinkedQueue<Mutation> writeAsyncBuffer = new ConcurrentLinkedQueue<>();
        private final AtomicLong currentWriteBufferSize = new AtomicLong(0);
        /**
         * Count the size of {@link BufferedMutatorImpl#writeAsyncBuffer}.
         * The {@link ConcurrentLinkedQueue#size()} is NOT a constant-time operation.
         */
        private final AtomicInteger undealtMutationCount = new AtomicInteger(0);
        private volatile long writeBufferSize;  //here
      

      Attachments

        1. HBASE-19531.v1.patch
          3 kB
          Yun-Chi Shih
        2. HBASE-19531.v0.patch
          3 kB
          Yun-Chi Shih

        Activity

          People

            lemon830921 Yun-Chi Shih
            chia7712 Chia-Ping Tsai
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: