You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-zh@flink.apache.org by ggc <63...@qq.com> on 2021/03/23 12:17:34 UTC

flink sql 写hive并行度设置问题

Hi, 请问:

env.setParallelism(8);
source = select * from table1,  

Table filterTable = source.filter(x-> x>10).limit(1);

try (CloseableIterator<Row> rows = filterTable.execute().collect()) {
      while (rows.hasNext()) {
          Row r = rows.next();
          String a = r.getField(1).toString();
          String b = r.getField(2).toString();
          String c = r.getField(3).toString();

          // 往结果表写入数据
          stableEnv.executeSql("insert into table2 values('a', 'b','c') ");
      }
}

发现source 和 最后写入表的sink都是1个并行度,只有filter 使用了8个并行度,这是正常的吗?



--
Sent from: http://apache-flink.147419.n8.nabble.com/