You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2020/11/23 20:44:38 UTC

[GitHub] [ozone] avijayanhwx commented on a change in pull request #1612: HDDS-4497. Recon File Size Count task throws SQL Exception.

avijayanhwx commented on a change in pull request #1612:
URL: https://github.com/apache/ozone/pull/1612#discussion_r528984469



##########
File path: hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/tasks/FileSizeCountTask.java
##########
@@ -96,7 +96,9 @@ private static int nextClosestPowerIndexOfTwo(long dataSize) {
       return new ImmutablePair<>(getTaskName(), false);
     }
     // Truncate table before inserting new rows
-    dslContext.truncate(FILE_COUNT_BY_SIZE);
+    int execute = dslContext.delete(FILE_COUNT_BY_SIZE).execute();

Review comment:
       From Jooq doc.
   
   `  * Most dialects implement the <code>TRUNCATE</code> statement. If it is not
        * supported, it is emulated using an equivalent <code>DELETE</code>
        * statement. This is particularly true for these dialects:
        * <ul>
        * <li> {@link SQLDialect#FIREBIRD}</li>
        * <li> {@link SQLDialect#INGRES}</li>
        * <li> {@link SQLDialect#SQLITE}</li>
        * </ul>`




----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org