Skip to content

mysql to hive 这里代码是不是有问题 #110

@maidou75293

Description

@maidou75293

obj != null && obj instanceof Map 为啥是map ?

@OverRide
public void writeRecord(Row row) throws IOException {
try {
if (row.getArity() == 2) {
Object obj = row.getField(0);
if (obj != null && obj instanceof Map) {
emitWithMap((Map<String, Object>) obj, row);
}
} else {
emitWithRow(row);
}
} catch (Throwable e) {
logger.error("{}", e);
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions