HBase
  1. HBase
  2. HBASE-8240

CompoundConfiguration should implement Iterable

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.98.0, 0.95.1
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      Here is from hadoop Configuration class:

      public class Configuration implements Iterable<Map.Entry<String,String>>,
      

      There're 3 addXX() methods for CompoundConfiguration:

        public CompoundConfiguration add(final Configuration conf) {
      
        public CompoundConfiguration addWritableMap(
            final Map<ImmutableBytesWritable, ImmutableBytesWritable> map) {
      
        public CompoundConfiguration addStringMap(final Map<String, String> map) {
      

      Parameters to these methods all support iteration.

      We can enhance ImmutableConfigMap with the following new method:

        public abstract java.util.Iterator iterator();
      

      Then the following method of CompoundConfiguration can be implemented:

        public Iterator<Map.Entry<String, String>> iterator() {
      

      This enhancement would be useful in scenario where a mutable Configuration is required.

      1. 8240-v7.txt
        7 kB
        Ted Yu
      2. 8240-v6.txt
        7 kB
        Ted Yu
      3. 8240-v4.txt
        7 kB
        Ted Yu
      4. 8240-v3.txt
        3 kB
        Ted Yu
      5. 8240-v2.txt
        5 kB
        Ted Yu

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Ted Yu
            Reporter:
            Ted Yu
          • Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development