You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/09/24 13:38:19 UTC

[GitHub] [doris] dinggege1024 opened a new pull request, #12818: [refactor](fe-core src test catalog): refactor and replace use NIO

dinggege1024 opened a new pull request, #12818:
URL: https://github.com/apache/doris/pull/12818

   # Proposed changes
   
   Issue Number: [#12780](https://github.com/apache/doris/issues/11768) 
   
   ## Problem summary
   
   refactor and replace use NIO
   
   ## Checklist(Required)
   
   1. Does it affect the original behavior: 
       - [✅] Yes
       - [ ] No
       - [ ] I don't know
   2. Has unit tests been added:
       - [ ] Yes
       - [ ] No
       - [✅] No Need
   3. Has document been added or modified:
       - [ ] Yes
       - [ ] No
       - [✅] No Need
   4. Does it need to update dependencies:
       - [ ] Yes
       - [✅] No
   5. Are there any changes that cannot be rolled back:
       - [ ] Yes (If Yes, please explain WHY)
       - [✅] No
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
   
   


-- 
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: commits-unsubscribe@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] jackwener merged pull request #12818: [refactor](fe-core src test catalog): refactor and replace use NIO

Posted by GitBox <gi...@apache.org>.
jackwener merged PR #12818:
URL: https://github.com/apache/doris/pull/12818


-- 
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: commits-unsubscribe@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] dinggege1024 commented on pull request #12818: [refactor](fe-core/src/test/catalog): refactor and replace use NIO

Posted by GitBox <gi...@apache.org>.
dinggege1024 commented on PR #12818:
URL: https://github.com/apache/doris/pull/12818#issuecomment-1253512370

   > Why changing this? Is there any explaination?
   
   Updated in proposed Changes


-- 
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: commits-unsubscribe@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on pull request #12818: [refactor](fe-core/src/test/catalog): refactor and replace use NIO

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #12818:
URL: https://github.com/apache/doris/pull/12818#issuecomment-1253800823

   PR approved by anyone and no changes requested.


-- 
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: commits-unsubscribe@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] dinggege1024 commented on pull request #12818: [refactor](fe-core src test catalog): refactor and replace use NIO

Posted by GitBox <gi...@apache.org>.
dinggege1024 commented on PR #12818:
URL: https://github.com/apache/doris/pull/12818#issuecomment-1256971469

   > Why changing this? Is there any explaination?
   
   


-- 
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: commits-unsubscribe@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] jackwener commented on pull request #12818: [refactor](fe-core/src/test/catalog): refactor and replace use NIO

Posted by GitBox <gi...@apache.org>.
jackwener commented on PR #12818:
URL: https://github.com/apache/doris/pull/12818#issuecomment-1253666496

   Thanks @dinggege1024 


-- 
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: commits-unsubscribe@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] morningman commented on pull request #12818: [refactor](fe-core/src/test/catalog): refactor and replace use NIO

Posted by GitBox <gi...@apache.org>.
morningman commented on PR #12818:
URL: https://github.com/apache/doris/pull/12818#issuecomment-1253484030

   Why changing this? Is there any explaination?


-- 
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: commits-unsubscribe@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] jackwener commented on a diff in pull request #12818: [refactor](fe-core src test catalog): refactor and replace use NIO

Posted by GitBox <gi...@apache.org>.
jackwener commented on code in PR #12818:
URL: https://github.com/apache/doris/pull/12818#discussion_r978341424


##########
fe/fe-core/src/test/java/org/apache/doris/catalog/ColumnStatsTest.java:
##########
@@ -59,29 +57,29 @@ public void testSerialization() throws Exception {
         dos.close();
 
         // 2. Read objects from file
-        DataInputStream dis = new DataInputStream(new FileInputStream(file));
+        DataInputStream dis = new DataInputStream(Files.newInputStream(path));
         ColumnStats rStats1 = new ColumnStats();
         rStats1.readFields(dis);
-        Assert.assertTrue(rStats1.equals(stats1));
+        Assert.assertEquals(rStats1, stats1);
 
         ColumnStats rStats2 = new ColumnStats();
         rStats2.readFields(dis);
-        Assert.assertTrue(rStats2.equals(stats2));
+        Assert.assertEquals(rStats2, stats2);
 
         ColumnStats rStats3 = ColumnStats.read(dis);
-        Assert.assertTrue(rStats3.equals(stats3));
+        Assert.assertEquals(rStats3, stats3);
 
         ColumnStats rStats4 = ColumnStats.read(dis);
-        Assert.assertTrue(rStats4.equals(stats4));
-        Assert.assertTrue(rStats4.equals(stats3));
+        Assert.assertEquals(rStats4, stats4);
+        Assert.assertEquals(rStats4, stats3);
 
-        Assert.assertTrue(rStats3.equals(rStats3));
-        Assert.assertFalse(rStats3.equals(this));
-        Assert.assertFalse(rStats2.equals(rStats3));
+        Assert.assertEquals(rStats3, rStats3);
+        Assert.assertNotEquals(rStats3, this);
+        Assert.assertNotEquals(rStats2, rStats3);
 
         // 3. delete files
         dis.close();
-        file.delete();
+        Files.exists(path);

Review Comment:
   deleteIfExists



-- 
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: commits-unsubscribe@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on pull request #12818: [refactor](fe-core/src/test/catalog): refactor and replace use NIO

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #12818:
URL: https://github.com/apache/doris/pull/12818#issuecomment-1253800758

   PR approved by at least one committer and no changes requested.


-- 
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: commits-unsubscribe@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] jackwener commented on a diff in pull request #12818: [refactor](fe-core/src/test/catalog): refactor and replace use NIO

Posted by GitBox <gi...@apache.org>.
jackwener commented on code in PR #12818:
URL: https://github.com/apache/doris/pull/12818#discussion_r976455467


##########
fe/fe-core/src/test/java/org/apache/doris/catalog/ColumnGsonSerializationTest.java:
##########
@@ -117,6 +111,9 @@ public void testSerializeColumnList() throws IOException, AnalysisException {
         Assert.assertEquals(c1, columns.get(0));
         Assert.assertEquals(c2, columns.get(1));
         Assert.assertEquals(c3, columns.get(2));
+        // 3. Delete files
+        in.close();

Review Comment:
   👍



##########
fe/fe-core/src/test/java/org/apache/doris/catalog/AdminStmtTest.java:
##########
@@ -20,21 +20,19 @@
 import org.apache.doris.analysis.AdminSetReplicaStatusStmt;
 import org.apache.doris.catalog.MaterializedIndex.IndexExtState;
 import org.apache.doris.catalog.Replica.ReplicaStatus;
-import org.apache.doris.common.AnalysisException;
 import org.apache.doris.common.Pair;
 import org.apache.doris.persist.SetReplicaStatusOperationLog;
 import org.apache.doris.utframe.TestWithFeService;
 
 import com.google.common.collect.Lists;
-import org.junit.Assert;
+import org.junit.jupiter.api.Assertions;

Review Comment:
   Good👍, Nereids already use junit 5 allover.



-- 
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: commits-unsubscribe@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] dinggege1024 commented on pull request #12818: [refactor](fe-core/src/test/catalog): refactor and replace use NIO

Posted by GitBox <gi...@apache.org>.
dinggege1024 commented on PR #12818:
URL: https://github.com/apache/doris/pull/12818#issuecomment-1253497396

   > Why changing this? Is there any explaination?
   You can trace the explaination in this issue~
   
   https://github.com/apache/doris/issues/11768


-- 
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: commits-unsubscribe@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] dinggege1024 closed pull request #12818: [refactor](fe-core src test catalog): refactor and replace use NIO

Posted by GitBox <gi...@apache.org>.
dinggege1024 closed pull request #12818: [refactor](fe-core src test catalog): refactor and replace use NIO
URL: https://github.com/apache/doris/pull/12818


-- 
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: commits-unsubscribe@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] jackwener commented on pull request #12818: [refactor](fe-core src test catalog): refactor and replace use NIO

Posted by GitBox <gi...@apache.org>.
jackwener commented on PR #12818:
URL: https://github.com/apache/doris/pull/12818#issuecomment-1257667311

   Thanks @dinggege1024 


-- 
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: commits-unsubscribe@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on pull request #12818: [refactor](fe-core src test catalog): refactor and replace use NIO

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #12818:
URL: https://github.com/apache/doris/pull/12818#issuecomment-1257689003

   PR approved by at least one committer and no changes requested.


-- 
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: commits-unsubscribe@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org