[
https://issues.apache.org/jira/browse/SQOOP-2003?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14274478#comment-14274478
]
Veena Basavaraj commented on SQOOP-2003:
----------------------------------------
some thing like this should work, but I am not sure since I have not tested it,
but if I remember it will need arrays and maps to be in GenericArray and
GenericRecord for this to work.
{code}
@Override
//http://avro.apache.org/docs/current/spec.html#order
public int compareTo(Object o) {
IntermediateDataFormat<?> idf = (IntermediateDataFormat<?>) o;
GenericData.Record record = (GenericData.Record)idf.getData();
return ((GenericData.Record) data).compareTo(record);
}
{code}
> Should not Schema be passed over the wire along with the IDF data?
> ------------------------------------------------------------------
>
> Key: SQOOP-2003
> URL: https://issues.apache.org/jira/browse/SQOOP-2003
> Project: Sqoop
> Issue Type: Sub-task
> Reporter: Veena Basavaraj
> Fix For: 2.0.0
>
>
> Should Schema be passed over the wire along with the IDF data?
> Related to matching as well, since we create matcher again in the
> SqoopOutputFormatExecutor
> {code}
> matcher = MatcherFactory.getMatcher(
> MRConfigurationUtils.getConnectorSchema(Direction.FROM,
> context.getConfiguration()),
> MRConfigurationUtils.getConnectorSchema(Direction.TO,
> context.getConfiguration()));
> toDataFormat = (IntermediateDataFormat<?>) ClassUtils.instantiate(context
> .getConfiguration().get(MRJobConstants.TO_INTERMEDIATE_DATA_FORMAT));
> // Using the TO schema since the SqoopDataWriter in the SqoopMapper
> encapsulates the toDataFormat
> toDataFormat.setSchema(matcher.getToSchema());
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)