Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-3858

Data from JdbcIO.read() cannot pass to next transform on ApexRunner

Details

    • Bug
    • Status: Resolved
    • P3
    • Resolution: Fixed
    • 2.3.0
    • Missing
    • runner-apex
    • None
    • ubuntu16.04

    Description

      
      public static void testJDBCRead(Pipeline pipeline) {
          System.out.println("in testJDBCRead()");
          pipeline.apply(JdbcIO.<String>read()
                  .withDataSourceConfiguration(JdbcIO.DataSourceConfiguration.create(
                          "com.mysql.jdbc.Driver", "jdbc:mysql://localhost:3307/libra")
                          .withUsername("root")
                          .withPassword("123456"))
                  .withQuery("SELECT * FROM o_flow_account_login limit 3")
                  .withCoder(StringUtf8Coder.of())
                  .withRowMapper(new JdbcIO.RowMapper<String>() {
                      public String mapRow(ResultSet resultSet) throws Exception {
                          System.out.println("maprow");
                          return "tmp";
                      }
                  })
      
          )
      
                  .apply(ParDo.of(new DoFn<String, String>() {
                              @ProcessElement
                              public void process(ProcessContext context) {
                                  System.out.println("??");
                                  context.output(" ");
                              }
                          }));
      }
      

      On DirectRunner or FlinkRunner, screen shows:

      maprow
      maprow
      maprow
      ??
      ??
      ??
      

      however on ApexRunner, screen only shows:

      maprow
      maprow
      maprow
      

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            huangjianhuang huangjianhuang
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: