hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Poepping <poe...@amazon.com>
Subject Re: Review Request 50359: HIVE-14270: Write temporary data to HDFS when doing inserts on tables located on S3
Date Fri, 22 Jul 2016 22:05:02 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/50359/#review143280
-----------------------------------------------------------




common/src/java/org/apache/hadoop/hive/common/ObjectStoreUtils.java (lines 44 - 46)
<https://reviews.apache.org/r/50359/#comment209063>

    second @Steve Loughran's comment that we should pull this from a config file. maybe another
config value for hive-site.xml, a comma separated value list of objectstore schemes? it need
not all be S3 related, right?



common/src/test/org/apache/hadoop/hive/common/TestObjectStoreUtils.java (lines 26 - 27)
<https://reviews.apache.org/r/50359/#comment209059>

    suggest we use either junit.framework OR org.junit.



common/src/test/org/apache/hadoop/hive/common/TestObjectStoreUtils.java (lines 30 - 47)
<https://reviews.apache.org/r/50359/#comment209061>

    could we have a second test method that tests your isObjectStoreFileSystem() function?
    
    you can mock the Filesystem objects with Mockito



ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java (lines 6646 - 6654)
<https://reviews.apache.org/r/50359/#comment209062>

    as suggested on the Jira issue, is there a way we could move this logic to a helper function,
to avoid having to change it in multiple places, or newcomers to this section of the code
potentially forgetting to check this?


We have multiple things to remember:
 - this needs to be extensible; not all objectstores are S3
 - we need this to be happening in the background, we can't have "if path is S3" in front
of each time we find a tmpPath. that's not scalable (from a programmer's point of view, not
a functionality point of view)

- Thomas Poepping


On July 22, 2016, 9:45 p.m., Sergio Pena wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50359/
> -----------------------------------------------------------
> 
> (Updated July 22, 2016, 9:45 p.m.)
> 
> 
> Review request for hive.
> 
> 
> Bugs: HIVE-14270
>     https://issues.apache.org/jira/browse/HIVE-14270
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> This patch will create a temporary directory for Hive intermediate data on HDFS when
S3 tables are used.
> 
> 
> Diffs
> -----
> 
>   common/src/java/org/apache/hadoop/hive/common/ObjectStoreUtils.java PRE-CREATION 
>   common/src/test/org/apache/hadoop/hive/common/TestObjectStoreUtils.java PRE-CREATION

>   ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java 698efdc 
> 
> Diff: https://reviews.apache.org/r/50359/diff/
> 
> 
> Testing
> -------
> 
> NO PATCH
> ** NON-PARTITIONED TABLE
> 
> - create table dummy (id int);                                                      
                    3.651s
> - insert into table s3dummy values (1);                                             
                   39.231s
> - insert overwrite table s3dummy values (1);                                        
                   42.569s
> - insert overwrite directory 's3a://spena-bucket/dirs/s3dummy' select * from dummy; 
                   30.136s
> 
> EXTERNAL TABLE
> 
> - create table s3dummy_ext like s3dummy location 's3a://spena-bucket/user/hive/warehouse/s3dummy';
      9.297s
> - insert into table s3dummy_ext values (1);                                         
                   45.855s
> 
> WITH PATCH
> 
> ** NON-PARTITIONED TABLE
> - create table s3dummy (id int) location 's3a://spena-bucket/user/hive/warehouse/s3dummy';
              3.945s
> - insert into table s3dummy values (1);                                             
                   15.025s
> - insert overwrite table s3dummy values (1);                                        
                   25.149s     
> - insert overwrite directory 's3a://spena-bucket/dirs/s3dummy' select * from dummy; 
                   19.158s      
> - from dummy insert overwrite table s3dummy select *;                               
                   25.469s      
> - from dummy insert into table s3dummy select *;                                    
                   14.501s
> 
> ** EXTERNAL TABLE
> - create table s3dummy_ext like s3dummy location 's3a://spena-bucket/user/hive/warehouse/s3dummy';
      4.827s
> - insert into table s3dummy_ext values (1);                                         
                   16.070s
> 
> ** PARTITIONED TABLE
> - create table s3dummypart (id int) partitioned by (part int)
>   location 's3a://spena-bucket/user/hive/warehouse/s3dummypart';                    
                    3.176s
> - alter table s3dummypart add partition (part=1);                                   
                    3.229s
> - alter table s3dummypart add partition (part=2);                                   
                    3.124s
> - insert into table s3dummypart partition (part=1) values (1);                      
                   14.876s
> - insert overwrite table s3dummypart partition (part=1) values (1);                 
                   27.594s     
> - insert overwrite directory 's3a://spena-bucket/dirs/s3dummypart' select * from dummypart;
            22.298s      
> - from dummypart insert overwrite table s3dummypart partition (part=1) select id;   
                   29.001s      
> - from dummypart insert into table s3dummypart partition (part=1) select id;        
                   14.869s
> 
> ** DYNAMIC PARTITIONS
> - insert into table s3dummypart partition (part) select id, 1 from dummypart;       
                   15.185s
> - insert into table s3dummypart partition (part) select id, 1 from dummypart;       
                   18.820s
> 
> 
> Thanks,
> 
> Sergio Pena
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message