[ 
https://issues.apache.org/jira/browse/IMPALA-11736?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17644414#comment-17644414
 ] 

ASF subversion and git services commented on IMPALA-11736:
----------------------------------------------------------

Commit 67fe0c9c6f220582ee3ceb1ab78d692c2e87f526 in impala's branch 
refs/heads/master from Michael Smith
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=67fe0c9c6 ]

IMPALA-11736: Copy data between ofs buckets

When Impala moves a file - such as for a LOAD DATA statement - it checks
whether the source and destination are the same filesystem. If the same,
it uses hdfsRename, otherwise it uses hdfsMove to move between
filesystems.

Ozone's ofs protocol supports referencing multiple buckets by path in
the same filesystem, but does not support rename between them. All other
filesystems Impala supports include the bucket name (if they use that
concept) in the authority. This patch updates the function used to
determine whether two paths are in the same filesystem to also check
that they're in the same bucket as a requirement for hdfsRename.

Testing: ran test suite with Ozone.

Change-Id: Ic61f01672fa605fec0377885b13a1621573e424e
Reviewed-on: http://gerrit.cloudera.org:8080/19262
Reviewed-by: Joe McDonnell <joemcdonn...@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com>


> LOAD DATA statement with Ozone data can not load data from different bucket
> ---------------------------------------------------------------------------
>
>                 Key: IMPALA-11736
>                 URL: https://issues.apache.org/jira/browse/IMPALA-11736
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Frontend
>    Affects Versions: Impala 4.2.0
>            Reporter: Michael Smith
>            Assignee: Michael Smith
>            Priority: Major
>              Labels: ozone
>             Fix For: Impala 4.3.0
>
>
> Attempt to load data from one bucket into a table stored in another bucket 
> and you get an error:
> {code}
> $ ozone sh bucket create impala/tmp
> $ ozone sh bucket create impala/foo
> $ ozone fs -cp /impala/test-warehouse/tpch.nation/nation.tbl /impala/tmp
> $ impala-shell
> > create table nation like tpch.nation location 
> > 'ofs://localhost:9862/impala/foo/nation';
> Query: create table nation like tpch.nation location 
> 'ofs://localhost:9862/impala/foo/nation'
> +-------------------------+
> | summary                 |
> +-------------------------+
> | Table has been created. |
> +-------------------------+
> Fetched 1 row(s) in 0.14s
> > load data inpath 'ofs://localhost:9862/impala/tmp/nation.tbl' into table 
> > nation;
> Query: load data inpath 'ofs://localhost:9862/impala/tmp/nation.tbl' into 
> table nation
> ERROR: IOException: Cannot rename a key to a different bucket
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscr...@impala.apache.org
For additional commands, e-mail: issues-all-h...@impala.apache.org

Reply via email to