|
6 | 6 | package org.opensearch.sql.calcite.remote; |
7 | 7 |
|
8 | 8 | import static org.opensearch.sql.legacy.TestsConstants.TEST_INDEX_HDFS_LOGS; |
| 9 | +import static org.opensearch.sql.util.MatcherUtils.rows; |
9 | 10 | import static org.opensearch.sql.util.MatcherUtils.schema; |
| 11 | +import static org.opensearch.sql.util.MatcherUtils.verifyDataRows; |
10 | 12 | import static org.opensearch.sql.util.MatcherUtils.verifySchemaInOrder; |
11 | 13 |
|
| 14 | +import com.google.common.collect.ImmutableList; |
12 | 15 | import java.io.IOException; |
13 | 16 | import org.json.JSONObject; |
14 | 17 | import org.junit.Test; |
@@ -42,5 +45,30 @@ public void testDashboardBrainLabelStatsByPatternsField() throws IOException { |
42 | 45 | schema("patterns_field", "string"), |
43 | 46 | schema("pattern_count", "bigint"), |
44 | 47 | schema("sample_logs", "array")); |
| 48 | + verifyDataRows( |
| 49 | + result, |
| 50 | + rows( |
| 51 | + "BLOCK* NameSystem.addStoredBlock: blockMap updated: <*IP*> is added to blk_<*> size" |
| 52 | + + " <*>", |
| 53 | + 2, |
| 54 | + ImmutableList.of( |
| 55 | + "BLOCK* NameSystem.addStoredBlock: blockMap updated: 10.251.31.85:50010 is added" |
| 56 | + + " to blk_-7017553867379051457 size 67108864")), |
| 57 | + rows( |
| 58 | + "PacketResponder failed <*> blk_<*>", |
| 59 | + 2, |
| 60 | + ImmutableList.of("PacketResponder failed for blk_6996194389878584395")), |
| 61 | + rows( |
| 62 | + "Verification succeeded <*> blk_<*>", |
| 63 | + 2, |
| 64 | + ImmutableList.of("Verification succeeded for blk_-1547954353065580372")), |
| 65 | + rows( |
| 66 | + "<*> NameSystem.allocateBlock:" |
| 67 | + + " /user/root/sortrand/_temporary/_task_<*>_<*>_r_<*>_<*>/part<*> blk_<*>", |
| 68 | + 2, |
| 69 | + ImmutableList.of( |
| 70 | + "BLOCK* NameSystem.allocateBlock:" |
| 71 | + + " /user/root/sortrand/_temporary/_task_200811092030_0002_r_000296_0/part-00296." |
| 72 | + + " blk_-6620182933895093708"))); |
45 | 73 | } |
46 | 74 | } |
0 commit comments