You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@sqoop.apache.org by "Swati Ambulkar -X (sambulka - PERSISTENT SYSTEMS INC at Cisco)" <sa...@cisco.com> on 2015/05/28 01:04:16 UTC

Sqoop - Issue with BlobRef object cloning

Hi All:

Has anyone used sqoop  successfully for BLOB data import and merge?
I am running into this issue when trying to clone a BlobRef object for merging after incremental import:
Getting CloneNotSupportedException : highlighted clone call and other details below:

public Object clone() throws CloneNotSupportedException {
    QueryResult o = (QueryResult) super.clone();
    o.LOBOBJECT = (o.LOBOBJECT != null) ? (com.cloudera.sqoop.lib.BlobRef) o.LOBOBJECT.clone() : null;
    o.LAST_UPDATE_DATE = (o.LAST_UPDATE_DATE != null) ? (java.sql.Timestamp) o.LAST_UPDATE_DATE.clone() : null;
    return o;
  }

LobRef.class (decompiled source) :
Source Code ( #108-113) http://grepcode.com/file/repository.cloudera.com/content/repositories/releases/org.apache.sqoop/sqoop/1.4.3-cdh4.3.0/org/apache/sqoop/lib/LobRef.java?av=f


public Object clone() throws CloneNotSupportedException {
    LobRef r = (LobRef)super.clone();   <-----------------------------------Throws exception
    r.lobReader = null;
    if(null != this.realData) {
        r.realData = this.deepCopyData(this.realData);
    }

    return r;
}



Blobref Object being cloned ( from debug session):

com.cloudera.sqoop.lib.BlobRef@927}"externalLob(lf,_lob/large_obj_attempt_201505121227_47522_m_000000_00.lob,68,10339)"

Stack trace:

2015-05-27 11:17:11,861 WARN org.apache.hadoop.mapred.Child: Error running child
java.io.IOException: java.lang.CloneNotSupportedException: com.cloudera.sqoop.lib.BlobRef
                                   :
                                  :
Caused by: java.lang.CloneNotSupportedException: com.cloudera.sqoop.lib.BlobRef
        at java.lang.Object.clone(Native Method)
        at org.apache.sqoop.lib.LobRef.clone(LobRef.java:109)
        ... 9 more
2015-05-27 11:17:11,864 INFO org.apache.hadoop.mapred.Task: Runnning cleanup for the task



Re: Sqoop - Issue with BlobRef object cloning

Posted by Abraham Elmahrek <ab...@cloudera.com>.
I personally haven't but have you tried the latest distribution of Sqoop1?

-Abe

On Wed, May 27, 2015 at 4:04 PM, Swati Ambulkar -X (sambulka - PERSISTENT
SYSTEMS INC at Cisco) <sa...@cisco.com> wrote:

>  Hi All:
>
>
>
> Has anyone used sqoop  successfully for BLOB data import and merge?
>
> I am running into this issue when trying to clone a BlobRef object for
> merging after incremental import:
>
> Getting CloneNotSupportedException : highlighted clone call and other
> details below:
>
>
>
> public Object clone() throws CloneNotSupportedException {
>
>     QueryResult o = (QueryResult) super.clone();
>
>     o.LOBOBJECT = (o.LOBOBJECT != null) ? (com.cloudera.sqoop.lib.BlobRef)
> o.LOBOBJECT.clone() : null;
>
>     o.LAST_UPDATE_DATE = (o.LAST_UPDATE_DATE != null) ?
> (java.sql.Timestamp) o.LAST_UPDATE_DATE.clone() : null;
>
>     return o;
>
>   }
>
>
>
> *LobRef.class (decompiled source) :*
>
> *Source Code ( #108-113)
> http://grepcode.com/file/repository.cloudera.com/content/repositories/releases/org.apache.sqoop/sqoop/1.4.3-cdh4.3.0/org/apache/sqoop/lib/LobRef.java?av=f
> <http://grepcode.com/file/repository.cloudera.com/content/repositories/releases/org.apache.sqoop/sqoop/1.4.3-cdh4.3.0/org/apache/sqoop/lib/LobRef.java?av=f>*
>
>
>
> *public *Object clone() *throws *CloneNotSupportedException {
>     LobRef r = (LobRef)*super*.clone();   ß---------------------------------Throws exception
>     r.lobReader = *null*;
>     *if*(*null *!= *this*.realData) {
>         r.realData = *this*.deepCopyData(*this*.realData);
>     }
>
>     *return *r;
> }
>
>
>
> *Blobref Object being cloned ( from debug session):*
>
> com.cloudera.sqoop.lib.BlobRef@927}”externalLob(lf,_lob/large_obj_attempt_201505121227_47522_m_000000_00.lob,68,10339)”
>
>
>
> *Stack trace:*
>
>
>
> 2015-05-27 11:17:11,861 WARN org.apache.hadoop.mapred.Child: Error running
> child
>
> java.io.IOException: java.lang.CloneNotSupportedException:
> com.cloudera.sqoop.lib.BlobRef
>
>                                    :
>
>                                   :
>
> Caused by: java.lang.CloneNotSupportedException:
> com.cloudera.sqoop.lib.BlobRef
>
>         at java.lang.Object.clone(Native Method)
>
>         at org.apache.sqoop.lib.LobRef.clone(LobRef.java:109)
>
>         ... 9 more
>
> 2015-05-27 11:17:11,864 INFO org.apache.hadoop.mapred.Task: Runnning
> cleanup for the task
>
>
>
>
>