You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2021/12/07 01:51:30 UTC

[GitHub] [accumulo] EdColeman opened a new pull request #2376: reduce root table mutation logging to single line

EdColeman opened a new pull request #2376:
URL: https://github.com/apache/accumulo/pull/2376


   The root table mutation was pretty printing the mutation json object, causing the log statement to extend over multiple lines. This change removes the pretty print and combines the form / to so that it is one (very long line)
   
   The information seemed useful, but trace may be a better level, but I was unsure.
   
   I also tried using guava Map.compare, but the result did not seem much easier to read than just removing pretty printing.
   
   # Sample log statements - not the same statement, but representative samples:
   <details>
     <summary>Click to expand!</summary>
   Before:
   
   ```  
   2021-12-07T01:18:14,946 [metadata.RootTabletMutatorImpl] DEBUG: Before mutating : {
     "version": 1,
     "columnValues": {
       "file": {
         "file:[dir...]/test/target/mini-tests/org.apache.accumulo.test.compaction.ExternalCompaction_2_IT_testExternalCompactionsSucceedsRunWithTableOffline/accumulo/tables/+r/root_tablet/A000000f.rf": "1040,15",
         "file:[dir...]/test/target/mini-tests/org.apache.accumulo.test.compaction.ExternalCompaction_2_IT_testExternalCompactionsSucceedsRunWithTableOffline/accumulo/tables/+r/root_tablet/F000000g.rf": "423,4"
       },
       "last": {
         "100000b611e0006": "ip-127-0-0-1:34523"
       },
       "loc": {
         "100000b611e0006": "ip-127-0-0-1:34523"
       },
       "srv": {
         "dir": "root_tablet",
         "flush": "8",
         "lock": "tservers/ip-127-0-0-1:34523/zlock#923249b7-97f5-4862-b11a-679d12295a5a#0000000000$100000b611e0006",
         "time": "L20"
       },
       "~tab": {
         "~pr": "\u0000"
       }
     }
   }, 
   2021-12-07T01:18:14,947 [metadata.RootTabletMutatorImpl] DEBUG: After mutating : {
     "version": 1,
     "columnValues": {
       "file": {
         "file:[dir...]/test/target/mini-tests/org.apache.accumulo.test.compaction.ExternalCompaction_2_IT_testExternalCompactionsSucceedsRunWithTableOffline/accumulo/tables/+r/root_tablet/A000000h.rf": "1041,15"
       },
       "last": {
         "100000b611e0006": "ip-127-0-0-1:34523"
       },
       "loc": {
         "100000b611e0006": "ip-127-0-0-1:34523"
       },
       "srv": {
         "dir": "root_tablet",
         "flush": "8",
         "lock": "tservers/ip-127-0-0-1:34523/zlock#923249b7-97f5-4862-b11a-679d12295a5a#0000000000$100000b611e0006",
         "time": "L20"
       },
       "~tab": {
         "~pr": "\u0000"
       }
     }
   }
   
   ```
   After
   ```
   2021-12-06T18:15:00,768 [metadata.RootTabletMutatorImpl] DEBUG: mutation: from:[{"version":1,"columnValues":{"file":{"file:[dir...]/test/target/mini-tests/org.apache.accumulo.test.compaction.ExternalCompaction_2_IT_testDeleteTableCancelsExternalCompaction/accumulo/tables/+r/root_tablet/00000_00000.rf":"0,0","file:[dir...]/test/target/mini-tests/org.apache.accumulo.test.compaction.ExternalCompaction_2_IT_testDeleteTableCancelsExternalCompaction/accumulo/tables/+r/root_tablet/F0000001.rf":"1044,14","file:[dir...]/test/target/mini-tests/org.apache.accumulo.test.compaction.ExternalCompaction_2_IT_testDeleteTableCancelsExternalCompaction/accumulo/tables/+r/root_tablet/F0000008.rf":"1136,14"},"last":{"100014a72660006":"ip-127-0-0-1:46323"},"loc":{"100014a72660006":"ip-127-0-0-1:46323"},"srv":{"dir":"root_tablet","flush":"2","lock":"tservers/ip-127-0-0-1:46323/zlock#243cd081-5afb-40c5-8099-71c97f801f3d#0000000000$100014a72660006","time":"L12"},"~tab":{"~pr":"\u0000"}}}] to: [{"version":1
 ,"columnValues":{"file":{"file:[dir...]/test/target/mini-tests/org.apache.accumulo.test.compaction.ExternalCompaction_2_IT_testDeleteTableCancelsExternalCompaction/accumulo/tables/+r/root_tablet/A0000009.rf":"1209,17"},"last":{"100014a72660006":"ip-10-113-12-166:46323"},"loc":{"100014a72660006":"ip-127-0-0-1:46323"},"srv":{"dir":"root_tablet","flush":"2","lock":"tservers/ip-127-0-0-1:46323/zlock#243cd081-5afb-40c5-8099-71c97f801f3d#0000000000$100014a72660006","time":"L12"},"~tab":{"~pr":"\u0000"}}}]
   
   ```
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [accumulo] milleruntime commented on pull request #2376: reduce root table mutation logging to single line

Posted by GitBox <gi...@apache.org>.
milleruntime commented on pull request #2376:
URL: https://github.com/apache/accumulo/pull/2376#issuecomment-988949117


   This change made me wonder if you can limit the size of log messages. I found a way to do it in Log4j but is a bit awkward. https://logging.apache.org/log4j/2.0/manual/layouts.html#PatternLayout 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [accumulo] EdColeman merged pull request #2376: reduce root table mutation logging to single line

Posted by GitBox <gi...@apache.org>.
EdColeman merged pull request #2376:
URL: https://github.com/apache/accumulo/pull/2376


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org