lidavidm commented on code in PR #39777:
URL: https://github.com/apache/arrow/pull/39777#discussion_r1624307066


##########
java/memory/memory-core/src/main/java/org/apache/arrow/memory/util/HistoricalLog.java:
##########
@@ -80,14 +85,15 @@ public HistoricalLog(final int limit, final String 
idStringFormat, Object... arg
    * @param noteFormat {@link String#format} format string that describes the 
event
    * @param args       for the format string, or nothing if none are required
    */
-  public synchronized void recordEvent(final String noteFormat, Object... 
args) {
+  @FormatMethod
+  public synchronized void recordEvent(@FormatString final String noteFormat, 
Object... args) {
     final String note = String.format(noteFormat, args);
     final Event event = new Event(note);
     if (firstEvent == null) {
       firstEvent = event;
     }
     if (history.size() == limit) {
-      history.removeFirst();
+      history.remove(0);

Review Comment:
   Is this good with ArrayList? Deque is probably preferable



##########
java/memory/memory-core/pom.xml:
##########


Review Comment:
   why do we have to duplicate this here? (if it's necessary I just want to 
document why)



##########
java/memory/memory-core/src/main/java/org/apache/arrow/memory/ChildAllocator.java:
##########
@@ -26,6 +26,7 @@
  * <p>Child allocators can only be created by the root, or other children, so
  * this class is package private.</p>
  */
+@SuppressWarnings("InvalidInlineTag")

Review Comment:
   I think this can be fixed by replacing `@see` with `@link` above.



##########
java/memory/memory-core/src/main/java/org/apache/arrow/memory/rounding/DefaultRoundingPolicy.java:
##########
@@ -44,20 +44,16 @@ public class DefaultRoundingPolicy implements 
RoundingPolicy {
 
   static {
     int defaultPageSize = 
Integer.getInteger("org.apache.memory.allocator.pageSize", 8192);
-    Throwable pageSizeFallbackCause = null;
     try {
       validateAndCalculatePageShifts(defaultPageSize);
     } catch (Throwable t) {
-      pageSizeFallbackCause = t;
       defaultPageSize = 8192;
     }
 
     int defaultMaxOrder = 
Integer.getInteger("org.apache.memory.allocator.maxOrder", 11);
-    Throwable maxOrderFallbackCause = null;
     try {
       validateAndCalculateChunkSize(defaultPageSize, defaultMaxOrder);
     } catch (Throwable t) {
-      maxOrderFallbackCause = t;

Review Comment:
   Possibly the intent was to log them below?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to