Uploaded image for project: 'Hadoop Map/Reduce'
  1. Hadoop Map/Reduce
  2. MAPREDUCE-2548

Log improvements in DBOutputFormat.java and CounterGroup.java

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • 2.0.0-alpha
    • None
    • None
    • None

    Description

      1. Instead of the printing the stack trace on the console, It can be logged.

      DBOutputFormat.java
          
      public void write(K key, V value) throws IOException {
            try {
              key.write(statement);
              statement.addBatch();
            } catch (SQLException e) {
              e.printStackTrace();
            }
          }
      

      2. Missing resource information can be logged.

      CounterGroup .java
      protected CounterGroup(String name) {
          this.name = name;
          try {
            bundle = getResourceBundle(name);
          }
          catch (MissingResourceException neverMind) {
          }
          displayName = localize("CounterGroupName", name);
        }
      
      
        private String localize(String key, String defaultValue) {
          String result = defaultValue;
          if (bundle != null) {
            try {
              result = bundle.getString(key);
            }
            catch (MissingResourceException mre) {
            }
          }
          return result;
        }
      

      Attachments

        1. MAPREDUCE-2548-1.patch
          0.8 kB
          Devaraj Kavali
        2. MAPREDUCE-2548.patch
          2 kB
          Devaraj Kavali

        Issue Links

          Activity

            People

              devaraj Devaraj Kavali
              devaraj Devaraj Kavali
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: