PGBulkloadExportMapper.java 文件源码

java
阅读 25 收藏 0 点赞 0 评论 0

项目:aliyun-maxcompute-data-collectors 作者:
public void map(LongWritable key, Writable value, Context context)
  throws IOException, InterruptedException {
  try {
    String str = value.toString();
    if (value instanceof Text) {
      writer.write(str, 0, str.length());
      writer.newLine();
    } else if (value instanceof SqoopRecord) {
      writer.write(str, 0, str.length());
    }
  } catch (Exception e) {
    doExecuteUpdate("DROP TABLE " + tmpTableName);
    cleanup(context);
    throw new IOException(e);
  }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号