You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Min Zhou <co...@gmail.com> on 2009/06/04 07:31:10 UTC

How to define the format of files outputed by command INSERT OVERWRITE LOCAL DIRECTORY?

Hi all,

Any helps?


thanks,
Min
-- 
My research interests are distributed systems, parallel computing and
bytecode based virtual machine.

My profile:
http://www.linkedin.com/in/coderplay
My blog:
http://coderplay.javaeye.com

Re: How to define the format of files outputed by command INSERT OVERWRITE LOCAL DIRECTORY?

Posted by Min Zhou <co...@gmail.com>.
got! It's also my way.

Thanks,
Min

On Fri, Jun 5, 2009 at 5:29 PM, Zheng Shao <zs...@gmail.com> wrote:

> Let me summarize the steps:
> 1. Create external table on HDFS (STORED AS TEXTFILE) and INSERT OVERWRITE
> that table.
> 2. Use "hadoop dfs -getmerge" to get the data.
>
> So there is no need for running a "INSERT OVERWRITE LOCAL DIRECTORY".
>
> Zheng
>
>
> On Fri, Jun 5, 2009 at 2:16 AM, Min Zhou <co...@gmail.com> wrote:
>
>> hive> explain INSERT OVERWRITE LOCAL DIRECTORY '/home/hive/result' SELECT
>> * FROM staticacs;
>> OK
>> ABSTRACT SYNTAX TREE:
>>   (TOK_QUERY (TOK_FROM (TOK_TABREF staticacs)) (TOK_INSERT
>> (TOK_DESTINATION (TOK_LOCAL_DIR '/home/hive/result')) (TOK_SELECT
>> (TOK_SELEXPR TOK_ALLCOLREF))))
>>
>> STAGE DEPENDENCIES:
>>   Stage-1 is a root stage
>>   Stage-0 depends on stages: Stage-1
>>
>> STAGE PLANS:
>>   Stage: Stage-1
>>     Map Reduce
>>       Alias -> Map Operator Tree:
>>         staticacs
>>             Select Operator
>>               expressions:
>>                     expr: time
>>                     type: string
>>                     expr: application
>>                     type: string
>>                     expr: count1
>>                     type: int
>>                     expr: count2
>>                     type: int
>>                     expr: dt
>>                     type: string
>>               File Output Operator
>>                 compressed: true
>>                 GlobalTableId: 1
>>                 table:
>>                     input format: org.apache.hadoop.mapred.TextInputFormat
>>                     output format:
>> org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
>>
>>   Stage: Stage-0
>>     Move Operator
>>       files:
>>             hdfs directory: false
>>             destination: /home/hive/result
>>
>> Thanks,
>> Min
>>
>>
>> On Fri, Jun 5, 2009 at 4:53 PM, Zheng Shao <zs...@gmail.com> wrote:
>>
>>> Can you give an example? Please also include the results of "explain
>>> <query>" so we can see how many map-reduce jobs are there.
>>>
>>> Zheng
>>>
>>>
>>>
>>> On Fri, Jun 5, 2009 at 1:21 AM, Min Zhou <co...@gmail.com> wrote:
>>>
>>>> but is there any way to define row format of files outputed by command
>>>> "INSERT OVERWRITE LOCAL DIRECTORY '/tmp/aaa' SELECT ..." ? If I create an
>>>> external table to store result , then put it to local by that command, more
>>>> mapred job needed.
>>>>
>>>> Min
>>>>
>>>>
>>>> On Fri, Jun 5, 2009 at 2:04 PM, Zheng Shao <zs...@gmail.com> wrote:
>>>>
>>>>> Use dfs -getmerge.
>>>>>
>>>>> By the way, if you just want text file format, "INSERT OVERWRITE LOCAL
>>>>> DIRECTORY '/tmp/aaa' SELECT ..." is good enough. You don't need to split the
>>>>> process into 2 steps.
>>>>>
>>>>> Zheng
>>>>>
>>>>>
>>>>> On Thu, Jun 4, 2009 at 8:22 PM, Min Zhou <co...@gmail.com> wrote:
>>>>>
>>>>>> So how do you copy them back?
>>>>>> use dfs -germerge or INSERT OVERWRITE LOCAL DIRECTORY?
>>>>>>
>>>>>> Thanks,
>>>>>> Min
>>>>>>
>>>>>>
>>>>>> On Thu, Jun 4, 2009 at 1:48 PM, Zheng Shao <zs...@gmail.com> wrote:
>>>>>>
>>>>>>> No, we would need to copy the file back from HDFS. But I think there
>>>>>>> is no overhead - we are doing the same thing as INSERT OVERWRITE LOCAL
>>>>>>> DIRECTORY, I think.
>>>>>>>
>>>>>>> Zheng
>>>>>>>
>>>>>>>
>>>>>>> On Wed, Jun 3, 2009 at 10:45 PM, Min Zhou <co...@gmail.com>wrote:
>>>>>>>
>>>>>>>> Can external table stored at a local directory?
>>>>>>>>
>>>>>>>>
>>>>>>>> On Thu, Jun 4, 2009 at 1:42 PM, Zheng Shao <zs...@gmail.com>wrote:
>>>>>>>>
>>>>>>>>> You can first create an external table and then insert into that
>>>>>>>>> table.
>>>>>>>>>
>>>>>>>>> Zheng
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Wed, Jun 3, 2009 at 10:31 PM, Min Zhou <co...@gmail.com>wrote:
>>>>>>>>>
>>>>>>>>>> Hi all,
>>>>>>>>>>
>>>>>>>>>> Any helps?
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> thanks,
>>>>>>>>>> Min
>>>>>>>>>> --
>>>>>>>>>> My research interests are distributed systems, parallel computing
>>>>>>>>>> and bytecode based virtual machine.
>>>>>>>>>>
>>>>>>>>>> My profile:
>>>>>>>>>> http://www.linkedin.com/in/coderplay
>>>>>>>>>> My blog:
>>>>>>>>>> http://coderplay.javaeye.com
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Yours,
>>>>>>>>> Zheng
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> My research interests are distributed systems, parallel computing
>>>>>>>> and bytecode based virtual machine.
>>>>>>>>
>>>>>>>> My profile:
>>>>>>>> http://www.linkedin.com/in/coderplay
>>>>>>>> My blog:
>>>>>>>> http://coderplay.javaeye.com
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Yours,
>>>>>>> Zheng
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> My research interests are distributed systems, parallel computing and
>>>>>> bytecode based virtual machine.
>>>>>>
>>>>>> My profile:
>>>>>> http://www.linkedin.com/in/coderplay
>>>>>> My blog:
>>>>>> http://coderplay.javaeye.com
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Yours,
>>>>> Zheng
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> My research interests are distributed systems, parallel computing and
>>>> bytecode based virtual machine.
>>>>
>>>> My profile:
>>>> http://www.linkedin.com/in/coderplay
>>>> My blog:
>>>> http://coderplay.javaeye.com
>>>>
>>>
>>>
>>>
>>> --
>>> Yours,
>>> Zheng
>>>
>>
>>
>>
>> --
>> My research interests are distributed systems, parallel computing and
>> bytecode based virtual machine.
>>
>> My profile:
>> http://www.linkedin.com/in/coderplay
>> My blog:
>> http://coderplay.javaeye.com
>>
>
>
>
> --
> Yours,
> Zheng
>



-- 
My research interests are distributed systems, parallel computing and
bytecode based virtual machine.

My profile:
http://www.linkedin.com/in/coderplay
My blog:
http://coderplay.javaeye.com

Re: How to define the format of files outputed by command INSERT OVERWRITE LOCAL DIRECTORY?

Posted by Zheng Shao <zs...@gmail.com>.
Let me summarize the steps:
1. Create external table on HDFS (STORED AS TEXTFILE) and INSERT OVERWRITE
that table.
2. Use "hadoop dfs -getmerge" to get the data.

So there is no need for running a "INSERT OVERWRITE LOCAL DIRECTORY".

Zheng

On Fri, Jun 5, 2009 at 2:16 AM, Min Zhou <co...@gmail.com> wrote:

> hive> explain INSERT OVERWRITE LOCAL DIRECTORY '/home/hive/result' SELECT *
> FROM staticacs;
> OK
> ABSTRACT SYNTAX TREE:
>   (TOK_QUERY (TOK_FROM (TOK_TABREF staticacs)) (TOK_INSERT (TOK_DESTINATION
> (TOK_LOCAL_DIR '/home/hive/result')) (TOK_SELECT (TOK_SELEXPR
> TOK_ALLCOLREF))))
>
> STAGE DEPENDENCIES:
>   Stage-1 is a root stage
>   Stage-0 depends on stages: Stage-1
>
> STAGE PLANS:
>   Stage: Stage-1
>     Map Reduce
>       Alias -> Map Operator Tree:
>         staticacs
>             Select Operator
>               expressions:
>                     expr: time
>                     type: string
>                     expr: application
>                     type: string
>                     expr: count1
>                     type: int
>                     expr: count2
>                     type: int
>                     expr: dt
>                     type: string
>               File Output Operator
>                 compressed: true
>                 GlobalTableId: 1
>                 table:
>                     input format: org.apache.hadoop.mapred.TextInputFormat
>                     output format:
> org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
>
>   Stage: Stage-0
>     Move Operator
>       files:
>             hdfs directory: false
>             destination: /home/hive/result
>
> Thanks,
> Min
>
>
> On Fri, Jun 5, 2009 at 4:53 PM, Zheng Shao <zs...@gmail.com> wrote:
>
>> Can you give an example? Please also include the results of "explain
>> <query>" so we can see how many map-reduce jobs are there.
>>
>> Zheng
>>
>>
>>
>> On Fri, Jun 5, 2009 at 1:21 AM, Min Zhou <co...@gmail.com> wrote:
>>
>>> but is there any way to define row format of files outputed by command
>>> "INSERT OVERWRITE LOCAL DIRECTORY '/tmp/aaa' SELECT ..." ? If I create an
>>> external table to store result , then put it to local by that command, more
>>> mapred job needed.
>>>
>>> Min
>>>
>>>
>>> On Fri, Jun 5, 2009 at 2:04 PM, Zheng Shao <zs...@gmail.com> wrote:
>>>
>>>> Use dfs -getmerge.
>>>>
>>>> By the way, if you just want text file format, "INSERT OVERWRITE LOCAL
>>>> DIRECTORY '/tmp/aaa' SELECT ..." is good enough. You don't need to split the
>>>> process into 2 steps.
>>>>
>>>> Zheng
>>>>
>>>>
>>>> On Thu, Jun 4, 2009 at 8:22 PM, Min Zhou <co...@gmail.com> wrote:
>>>>
>>>>> So how do you copy them back?
>>>>> use dfs -germerge or INSERT OVERWRITE LOCAL DIRECTORY?
>>>>>
>>>>> Thanks,
>>>>> Min
>>>>>
>>>>>
>>>>> On Thu, Jun 4, 2009 at 1:48 PM, Zheng Shao <zs...@gmail.com> wrote:
>>>>>
>>>>>> No, we would need to copy the file back from HDFS. But I think there
>>>>>> is no overhead - we are doing the same thing as INSERT OVERWRITE LOCAL
>>>>>> DIRECTORY, I think.
>>>>>>
>>>>>> Zheng
>>>>>>
>>>>>>
>>>>>> On Wed, Jun 3, 2009 at 10:45 PM, Min Zhou <co...@gmail.com>wrote:
>>>>>>
>>>>>>> Can external table stored at a local directory?
>>>>>>>
>>>>>>>
>>>>>>> On Thu, Jun 4, 2009 at 1:42 PM, Zheng Shao <zs...@gmail.com> wrote:
>>>>>>>
>>>>>>>> You can first create an external table and then insert into that
>>>>>>>> table.
>>>>>>>>
>>>>>>>> Zheng
>>>>>>>>
>>>>>>>>
>>>>>>>> On Wed, Jun 3, 2009 at 10:31 PM, Min Zhou <co...@gmail.com>wrote:
>>>>>>>>
>>>>>>>>> Hi all,
>>>>>>>>>
>>>>>>>>> Any helps?
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> thanks,
>>>>>>>>> Min
>>>>>>>>> --
>>>>>>>>> My research interests are distributed systems, parallel computing
>>>>>>>>> and bytecode based virtual machine.
>>>>>>>>>
>>>>>>>>> My profile:
>>>>>>>>> http://www.linkedin.com/in/coderplay
>>>>>>>>> My blog:
>>>>>>>>> http://coderplay.javaeye.com
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Yours,
>>>>>>>> Zheng
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> My research interests are distributed systems, parallel computing and
>>>>>>> bytecode based virtual machine.
>>>>>>>
>>>>>>> My profile:
>>>>>>> http://www.linkedin.com/in/coderplay
>>>>>>> My blog:
>>>>>>> http://coderplay.javaeye.com
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Yours,
>>>>>> Zheng
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> My research interests are distributed systems, parallel computing and
>>>>> bytecode based virtual machine.
>>>>>
>>>>> My profile:
>>>>> http://www.linkedin.com/in/coderplay
>>>>> My blog:
>>>>> http://coderplay.javaeye.com
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Yours,
>>>> Zheng
>>>>
>>>
>>>
>>>
>>> --
>>> My research interests are distributed systems, parallel computing and
>>> bytecode based virtual machine.
>>>
>>> My profile:
>>> http://www.linkedin.com/in/coderplay
>>> My blog:
>>> http://coderplay.javaeye.com
>>>
>>
>>
>>
>> --
>> Yours,
>> Zheng
>>
>
>
>
> --
> My research interests are distributed systems, parallel computing and
> bytecode based virtual machine.
>
> My profile:
> http://www.linkedin.com/in/coderplay
> My blog:
> http://coderplay.javaeye.com
>



-- 
Yours,
Zheng

Re: How to define the format of files outputed by command INSERT OVERWRITE LOCAL DIRECTORY?

Posted by Min Zhou <co...@gmail.com>.
hive> explain INSERT OVERWRITE LOCAL DIRECTORY '/home/hive/result' SELECT *
FROM staticacs;
OK
ABSTRACT SYNTAX TREE:
  (TOK_QUERY (TOK_FROM (TOK_TABREF staticacs)) (TOK_INSERT (TOK_DESTINATION
(TOK_LOCAL_DIR '/home/hive/result')) (TOK_SELECT (TOK_SELEXPR
TOK_ALLCOLREF))))

STAGE DEPENDENCIES:
  Stage-1 is a root stage
  Stage-0 depends on stages: Stage-1

STAGE PLANS:
  Stage: Stage-1
    Map Reduce
      Alias -> Map Operator Tree:
        staticacs
            Select Operator
              expressions:
                    expr: time
                    type: string
                    expr: application
                    type: string
                    expr: count1
                    type: int
                    expr: count2
                    type: int
                    expr: dt
                    type: string
              File Output Operator
                compressed: true
                GlobalTableId: 1
                table:
                    input format: org.apache.hadoop.mapred.TextInputFormat
                    output format:
org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat

  Stage: Stage-0
    Move Operator
      files:
            hdfs directory: false
            destination: /home/hive/result

Thanks,
Min

On Fri, Jun 5, 2009 at 4:53 PM, Zheng Shao <zs...@gmail.com> wrote:

> Can you give an example? Please also include the results of "explain
> <query>" so we can see how many map-reduce jobs are there.
>
> Zheng
>
>
>
> On Fri, Jun 5, 2009 at 1:21 AM, Min Zhou <co...@gmail.com> wrote:
>
>> but is there any way to define row format of files outputed by command
>> "INSERT OVERWRITE LOCAL DIRECTORY '/tmp/aaa' SELECT ..." ? If I create an
>> external table to store result , then put it to local by that command, more
>> mapred job needed.
>>
>> Min
>>
>>
>> On Fri, Jun 5, 2009 at 2:04 PM, Zheng Shao <zs...@gmail.com> wrote:
>>
>>> Use dfs -getmerge.
>>>
>>> By the way, if you just want text file format, "INSERT OVERWRITE LOCAL
>>> DIRECTORY '/tmp/aaa' SELECT ..." is good enough. You don't need to split the
>>> process into 2 steps.
>>>
>>> Zheng
>>>
>>>
>>> On Thu, Jun 4, 2009 at 8:22 PM, Min Zhou <co...@gmail.com> wrote:
>>>
>>>> So how do you copy them back?
>>>> use dfs -germerge or INSERT OVERWRITE LOCAL DIRECTORY?
>>>>
>>>> Thanks,
>>>> Min
>>>>
>>>>
>>>> On Thu, Jun 4, 2009 at 1:48 PM, Zheng Shao <zs...@gmail.com> wrote:
>>>>
>>>>> No, we would need to copy the file back from HDFS. But I think there is
>>>>> no overhead - we are doing the same thing as INSERT OVERWRITE LOCAL
>>>>> DIRECTORY, I think.
>>>>>
>>>>> Zheng
>>>>>
>>>>>
>>>>> On Wed, Jun 3, 2009 at 10:45 PM, Min Zhou <co...@gmail.com> wrote:
>>>>>
>>>>>> Can external table stored at a local directory?
>>>>>>
>>>>>>
>>>>>> On Thu, Jun 4, 2009 at 1:42 PM, Zheng Shao <zs...@gmail.com> wrote:
>>>>>>
>>>>>>> You can first create an external table and then insert into that
>>>>>>> table.
>>>>>>>
>>>>>>> Zheng
>>>>>>>
>>>>>>>
>>>>>>> On Wed, Jun 3, 2009 at 10:31 PM, Min Zhou <co...@gmail.com>wrote:
>>>>>>>
>>>>>>>> Hi all,
>>>>>>>>
>>>>>>>> Any helps?
>>>>>>>>
>>>>>>>>
>>>>>>>> thanks,
>>>>>>>> Min
>>>>>>>> --
>>>>>>>> My research interests are distributed systems, parallel computing
>>>>>>>> and bytecode based virtual machine.
>>>>>>>>
>>>>>>>> My profile:
>>>>>>>> http://www.linkedin.com/in/coderplay
>>>>>>>> My blog:
>>>>>>>> http://coderplay.javaeye.com
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Yours,
>>>>>>> Zheng
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> My research interests are distributed systems, parallel computing and
>>>>>> bytecode based virtual machine.
>>>>>>
>>>>>> My profile:
>>>>>> http://www.linkedin.com/in/coderplay
>>>>>> My blog:
>>>>>> http://coderplay.javaeye.com
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Yours,
>>>>> Zheng
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> My research interests are distributed systems, parallel computing and
>>>> bytecode based virtual machine.
>>>>
>>>> My profile:
>>>> http://www.linkedin.com/in/coderplay
>>>> My blog:
>>>> http://coderplay.javaeye.com
>>>>
>>>
>>>
>>>
>>> --
>>> Yours,
>>> Zheng
>>>
>>
>>
>>
>> --
>> My research interests are distributed systems, parallel computing and
>> bytecode based virtual machine.
>>
>> My profile:
>> http://www.linkedin.com/in/coderplay
>> My blog:
>> http://coderplay.javaeye.com
>>
>
>
>
> --
> Yours,
> Zheng
>



-- 
My research interests are distributed systems, parallel computing and
bytecode based virtual machine.

My profile:
http://www.linkedin.com/in/coderplay
My blog:
http://coderplay.javaeye.com

Re: How to define the format of files outputed by command INSERT OVERWRITE LOCAL DIRECTORY?

Posted by Zheng Shao <zs...@gmail.com>.
Can you give an example? Please also include the results of "explain
<query>" so we can see how many map-reduce jobs are there.

Zheng


On Fri, Jun 5, 2009 at 1:21 AM, Min Zhou <co...@gmail.com> wrote:

> but is there any way to define row format of files outputed by command
> "INSERT OVERWRITE LOCAL DIRECTORY '/tmp/aaa' SELECT ..." ? If I create an
> external table to store result , then put it to local by that command, more
> mapred job needed.
>
> Min
>
>
> On Fri, Jun 5, 2009 at 2:04 PM, Zheng Shao <zs...@gmail.com> wrote:
>
>> Use dfs -getmerge.
>>
>> By the way, if you just want text file format, "INSERT OVERWRITE LOCAL
>> DIRECTORY '/tmp/aaa' SELECT ..." is good enough. You don't need to split the
>> process into 2 steps.
>>
>> Zheng
>>
>>
>> On Thu, Jun 4, 2009 at 8:22 PM, Min Zhou <co...@gmail.com> wrote:
>>
>>> So how do you copy them back?
>>> use dfs -germerge or INSERT OVERWRITE LOCAL DIRECTORY?
>>>
>>> Thanks,
>>> Min
>>>
>>>
>>> On Thu, Jun 4, 2009 at 1:48 PM, Zheng Shao <zs...@gmail.com> wrote:
>>>
>>>> No, we would need to copy the file back from HDFS. But I think there is
>>>> no overhead - we are doing the same thing as INSERT OVERWRITE LOCAL
>>>> DIRECTORY, I think.
>>>>
>>>> Zheng
>>>>
>>>>
>>>> On Wed, Jun 3, 2009 at 10:45 PM, Min Zhou <co...@gmail.com> wrote:
>>>>
>>>>> Can external table stored at a local directory?
>>>>>
>>>>>
>>>>> On Thu, Jun 4, 2009 at 1:42 PM, Zheng Shao <zs...@gmail.com> wrote:
>>>>>
>>>>>> You can first create an external table and then insert into that
>>>>>> table.
>>>>>>
>>>>>> Zheng
>>>>>>
>>>>>>
>>>>>> On Wed, Jun 3, 2009 at 10:31 PM, Min Zhou <co...@gmail.com>wrote:
>>>>>>
>>>>>>> Hi all,
>>>>>>>
>>>>>>> Any helps?
>>>>>>>
>>>>>>>
>>>>>>> thanks,
>>>>>>> Min
>>>>>>> --
>>>>>>> My research interests are distributed systems, parallel computing and
>>>>>>> bytecode based virtual machine.
>>>>>>>
>>>>>>> My profile:
>>>>>>> http://www.linkedin.com/in/coderplay
>>>>>>> My blog:
>>>>>>> http://coderplay.javaeye.com
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Yours,
>>>>>> Zheng
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> My research interests are distributed systems, parallel computing and
>>>>> bytecode based virtual machine.
>>>>>
>>>>> My profile:
>>>>> http://www.linkedin.com/in/coderplay
>>>>> My blog:
>>>>> http://coderplay.javaeye.com
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Yours,
>>>> Zheng
>>>>
>>>
>>>
>>>
>>> --
>>> My research interests are distributed systems, parallel computing and
>>> bytecode based virtual machine.
>>>
>>> My profile:
>>> http://www.linkedin.com/in/coderplay
>>> My blog:
>>> http://coderplay.javaeye.com
>>>
>>
>>
>>
>> --
>> Yours,
>> Zheng
>>
>
>
>
> --
> My research interests are distributed systems, parallel computing and
> bytecode based virtual machine.
>
> My profile:
> http://www.linkedin.com/in/coderplay
> My blog:
> http://coderplay.javaeye.com
>



-- 
Yours,
Zheng

Re: How to define the format of files outputed by command INSERT OVERWRITE LOCAL DIRECTORY?

Posted by Min Zhou <co...@gmail.com>.
but is there any way to define row format of files outputed by command
"INSERT OVERWRITE LOCAL DIRECTORY '/tmp/aaa' SELECT ..." ? If I create an
external table to store result , then put it to local by that command, more
mapred job needed.

Min

On Fri, Jun 5, 2009 at 2:04 PM, Zheng Shao <zs...@gmail.com> wrote:

> Use dfs -getmerge.
>
> By the way, if you just want text file format, "INSERT OVERWRITE LOCAL
> DIRECTORY '/tmp/aaa' SELECT ..." is good enough. You don't need to split the
> process into 2 steps.
>
> Zheng
>
>
> On Thu, Jun 4, 2009 at 8:22 PM, Min Zhou <co...@gmail.com> wrote:
>
>> So how do you copy them back?
>> use dfs -germerge or INSERT OVERWRITE LOCAL DIRECTORY?
>>
>> Thanks,
>> Min
>>
>>
>> On Thu, Jun 4, 2009 at 1:48 PM, Zheng Shao <zs...@gmail.com> wrote:
>>
>>> No, we would need to copy the file back from HDFS. But I think there is
>>> no overhead - we are doing the same thing as INSERT OVERWRITE LOCAL
>>> DIRECTORY, I think.
>>>
>>> Zheng
>>>
>>>
>>> On Wed, Jun 3, 2009 at 10:45 PM, Min Zhou <co...@gmail.com> wrote:
>>>
>>>> Can external table stored at a local directory?
>>>>
>>>>
>>>> On Thu, Jun 4, 2009 at 1:42 PM, Zheng Shao <zs...@gmail.com> wrote:
>>>>
>>>>> You can first create an external table and then insert into that table.
>>>>>
>>>>> Zheng
>>>>>
>>>>>
>>>>> On Wed, Jun 3, 2009 at 10:31 PM, Min Zhou <co...@gmail.com> wrote:
>>>>>
>>>>>> Hi all,
>>>>>>
>>>>>> Any helps?
>>>>>>
>>>>>>
>>>>>> thanks,
>>>>>> Min
>>>>>> --
>>>>>> My research interests are distributed systems, parallel computing and
>>>>>> bytecode based virtual machine.
>>>>>>
>>>>>> My profile:
>>>>>> http://www.linkedin.com/in/coderplay
>>>>>> My blog:
>>>>>> http://coderplay.javaeye.com
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Yours,
>>>>> Zheng
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> My research interests are distributed systems, parallel computing and
>>>> bytecode based virtual machine.
>>>>
>>>> My profile:
>>>> http://www.linkedin.com/in/coderplay
>>>> My blog:
>>>> http://coderplay.javaeye.com
>>>>
>>>
>>>
>>>
>>> --
>>> Yours,
>>> Zheng
>>>
>>
>>
>>
>> --
>> My research interests are distributed systems, parallel computing and
>> bytecode based virtual machine.
>>
>> My profile:
>> http://www.linkedin.com/in/coderplay
>> My blog:
>> http://coderplay.javaeye.com
>>
>
>
>
> --
> Yours,
> Zheng
>



-- 
My research interests are distributed systems, parallel computing and
bytecode based virtual machine.

My profile:
http://www.linkedin.com/in/coderplay
My blog:
http://coderplay.javaeye.com

Re: How to define the format of files outputed by command INSERT OVERWRITE LOCAL DIRECTORY?

Posted by Zheng Shao <zs...@gmail.com>.
Use dfs -getmerge.

By the way, if you just want text file format, "INSERT OVERWRITE LOCAL
DIRECTORY '/tmp/aaa' SELECT ..." is good enough. You don't need to split the
process into 2 steps.

Zheng

On Thu, Jun 4, 2009 at 8:22 PM, Min Zhou <co...@gmail.com> wrote:

> So how do you copy them back?
> use dfs -germerge or INSERT OVERWRITE LOCAL DIRECTORY?
>
> Thanks,
> Min
>
>
> On Thu, Jun 4, 2009 at 1:48 PM, Zheng Shao <zs...@gmail.com> wrote:
>
>> No, we would need to copy the file back from HDFS. But I think there is no
>> overhead - we are doing the same thing as INSERT OVERWRITE LOCAL DIRECTORY,
>> I think.
>>
>> Zheng
>>
>>
>> On Wed, Jun 3, 2009 at 10:45 PM, Min Zhou <co...@gmail.com> wrote:
>>
>>> Can external table stored at a local directory?
>>>
>>>
>>> On Thu, Jun 4, 2009 at 1:42 PM, Zheng Shao <zs...@gmail.com> wrote:
>>>
>>>> You can first create an external table and then insert into that table.
>>>>
>>>> Zheng
>>>>
>>>>
>>>> On Wed, Jun 3, 2009 at 10:31 PM, Min Zhou <co...@gmail.com> wrote:
>>>>
>>>>> Hi all,
>>>>>
>>>>> Any helps?
>>>>>
>>>>>
>>>>> thanks,
>>>>> Min
>>>>> --
>>>>> My research interests are distributed systems, parallel computing and
>>>>> bytecode based virtual machine.
>>>>>
>>>>> My profile:
>>>>> http://www.linkedin.com/in/coderplay
>>>>> My blog:
>>>>> http://coderplay.javaeye.com
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Yours,
>>>> Zheng
>>>>
>>>
>>>
>>>
>>> --
>>> My research interests are distributed systems, parallel computing and
>>> bytecode based virtual machine.
>>>
>>> My profile:
>>> http://www.linkedin.com/in/coderplay
>>> My blog:
>>> http://coderplay.javaeye.com
>>>
>>
>>
>>
>> --
>> Yours,
>> Zheng
>>
>
>
>
> --
> My research interests are distributed systems, parallel computing and
> bytecode based virtual machine.
>
> My profile:
> http://www.linkedin.com/in/coderplay
> My blog:
> http://coderplay.javaeye.com
>



-- 
Yours,
Zheng

Re: How to define the format of files outputed by command INSERT OVERWRITE LOCAL DIRECTORY?

Posted by Min Zhou <co...@gmail.com>.
So how do you copy them back?
use dfs -germerge or INSERT OVERWRITE LOCAL DIRECTORY?

Thanks,
Min

On Thu, Jun 4, 2009 at 1:48 PM, Zheng Shao <zs...@gmail.com> wrote:

> No, we would need to copy the file back from HDFS. But I think there is no
> overhead - we are doing the same thing as INSERT OVERWRITE LOCAL DIRECTORY,
> I think.
>
> Zheng
>
>
> On Wed, Jun 3, 2009 at 10:45 PM, Min Zhou <co...@gmail.com> wrote:
>
>> Can external table stored at a local directory?
>>
>>
>> On Thu, Jun 4, 2009 at 1:42 PM, Zheng Shao <zs...@gmail.com> wrote:
>>
>>> You can first create an external table and then insert into that table.
>>>
>>> Zheng
>>>
>>>
>>> On Wed, Jun 3, 2009 at 10:31 PM, Min Zhou <co...@gmail.com> wrote:
>>>
>>>> Hi all,
>>>>
>>>> Any helps?
>>>>
>>>>
>>>> thanks,
>>>> Min
>>>> --
>>>> My research interests are distributed systems, parallel computing and
>>>> bytecode based virtual machine.
>>>>
>>>> My profile:
>>>> http://www.linkedin.com/in/coderplay
>>>> My blog:
>>>> http://coderplay.javaeye.com
>>>>
>>>
>>>
>>>
>>> --
>>> Yours,
>>> Zheng
>>>
>>
>>
>>
>> --
>> My research interests are distributed systems, parallel computing and
>> bytecode based virtual machine.
>>
>> My profile:
>> http://www.linkedin.com/in/coderplay
>> My blog:
>> http://coderplay.javaeye.com
>>
>
>
>
> --
> Yours,
> Zheng
>



-- 
My research interests are distributed systems, parallel computing and
bytecode based virtual machine.

My profile:
http://www.linkedin.com/in/coderplay
My blog:
http://coderplay.javaeye.com

Re: How to define the format of files outputed by command INSERT OVERWRITE LOCAL DIRECTORY?

Posted by Min Zhou <co...@gmail.com>.
Thanks Zheng.  Actaully , the property is hive.exec.compress.output,
regardless of mapred.output.compress.

Min

On Thu, Jun 4, 2009 at 2:40 PM, Zheng Shao <zs...@gmail.com> wrote:

> We need to disable compression.
> search for "compression" in your job.xml on hadoop jobtracker, and then
> disable it with "set mapred.compression.xxx.xxx=false" on Hive command line.
>
> Zheng
>
>
> On Wed, Jun 3, 2009 at 11:22 PM, Min Zhou <co...@gmail.com> wrote:
>
>> I created a table similar with yours,
>>
>> CREATE EXTERNAL TABLE staticacs(
>>   time string,
>>   application string,
>>   count1 int,
>>   count2 int)
>> PARTITIONED BY (dt STRING)
>> ROW FORMAT DELIMITED FIELDS TERMINATED BY '"'
>> STORED AS TEXTFILE;
>>
>> but I found files named *.deflate in directory
>> 'warehouse/staticacs/dt=20090531/' are not flat text files,  they were
>> unreadable.
>>
>> Min
>>
>>
>> On Thu, Jun 4, 2009 at 2:16 PM, Zheng Shao <zs...@gmail.com> wrote:
>>
>>> CREATE EXTERNAL TABLE abc ( a string, b string )
>>>   ROW FORMAT DELIMITED
>>>   FIELDS TERMINATED BY '\t'
>>>   STORED AS TEXTFILE
>>>   LOCATION '/user/mzhou/table_abc';
>>>
>>> Zheng
>>>
>>>
>>> On Wed, Jun 3, 2009 at 11:04 PM, Min Zhou <co...@gmail.com> wrote:
>>>
>>>> Thanks,  got.
>>>> Since output key-value pairs are serialized by Hive serdes,  while I
>>>> hope that can be a human-readable text instead,  how can i define this table
>>>> when creating?
>>>>
>>>> Min
>>>>
>>>> On Thu, Jun 4, 2009 at 1:48 PM, Zheng Shao <zs...@gmail.com> wrote:
>>>>
>>>>> No, we would need to copy the file back from HDFS. But I think there is
>>>>> no overhead - we are doing the same thing as INSERT OVERWRITE LOCAL
>>>>> DIRECTORY, I think.
>>>>>
>>>>> Zheng
>>>>>
>>>>>
>>>>> On Wed, Jun 3, 2009 at 10:45 PM, Min Zhou <co...@gmail.com> wrote:
>>>>>
>>>>>> Can external table stored at a local directory?
>>>>>>
>>>>>>
>>>>>> On Thu, Jun 4, 2009 at 1:42 PM, Zheng Shao <zs...@gmail.com> wrote:
>>>>>>
>>>>>>> You can first create an external table and then insert into that
>>>>>>> table.
>>>>>>>
>>>>>>> Zheng
>>>>>>>
>>>>>>>
>>>>>>> On Wed, Jun 3, 2009 at 10:31 PM, Min Zhou <co...@gmail.com>wrote:
>>>>>>>
>>>>>>>> Hi all,
>>>>>>>>
>>>>>>>> Any helps?
>>>>>>>>
>>>>>>>>
>>>>>>>> thanks,
>>>>>>>> Min
>>>>>>>> --
>>>>>>>> My research interests are distributed systems, parallel computing
>>>>>>>> and bytecode based virtual machine.
>>>>>>>>
>>>>>>>> My profile:
>>>>>>>> http://www.linkedin.com/in/coderplay
>>>>>>>> My blog:
>>>>>>>> http://coderplay.javaeye.com
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Yours,
>>>>>>> Zheng
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> My research interests are distributed systems, parallel computing and
>>>>>> bytecode based virtual machine.
>>>>>>
>>>>>> My profile:
>>>>>> http://www.linkedin.com/in/coderplay
>>>>>> My blog:
>>>>>> http://coderplay.javaeye.com
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Yours,
>>>>> Zheng
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> My research interests are distributed systems, parallel computing and
>>>> bytecode based virtual machine.
>>>>
>>>> My profile:
>>>> http://www.linkedin.com/in/coderplay
>>>> My blog:
>>>> http://coderplay.javaeye.com
>>>>
>>>
>>>
>>>
>>> --
>>> Yours,
>>> Zheng
>>>
>>
>>
>>
>> --
>> My research interests are distributed systems, parallel computing and
>> bytecode based virtual machine.
>>
>> My profile:
>> http://www.linkedin.com/in/coderplay
>> My blog:
>> http://coderplay.javaeye.com
>>
>
>
>
> --
> Yours,
> Zheng
>



-- 
My research interests are distributed systems, parallel computing and
bytecode based virtual machine.

My profile:
http://www.linkedin.com/in/coderplay
My blog:
http://coderplay.javaeye.com

Re: How to define the format of files outputed by command INSERT OVERWRITE LOCAL DIRECTORY?

Posted by Zheng Shao <zs...@gmail.com>.
We need to disable compression.
search for "compression" in your job.xml on hadoop jobtracker, and then
disable it with "set mapred.compression.xxx.xxx=false" on Hive command line.

Zheng

On Wed, Jun 3, 2009 at 11:22 PM, Min Zhou <co...@gmail.com> wrote:

> I created a table similar with yours,
>
> CREATE EXTERNAL TABLE staticacs(
>   time string,
>   application string,
>   count1 int,
>   count2 int)
> PARTITIONED BY (dt STRING)
> ROW FORMAT DELIMITED FIELDS TERMINATED BY '"'
> STORED AS TEXTFILE;
>
> but I found files named *.deflate in directory
> 'warehouse/staticacs/dt=20090531/' are not flat text files,  they were
> unreadable.
>
> Min
>
>
> On Thu, Jun 4, 2009 at 2:16 PM, Zheng Shao <zs...@gmail.com> wrote:
>
>> CREATE EXTERNAL TABLE abc ( a string, b string )
>>   ROW FORMAT DELIMITED
>>   FIELDS TERMINATED BY '\t'
>>   STORED AS TEXTFILE
>>   LOCATION '/user/mzhou/table_abc';
>>
>> Zheng
>>
>>
>> On Wed, Jun 3, 2009 at 11:04 PM, Min Zhou <co...@gmail.com> wrote:
>>
>>> Thanks,  got.
>>> Since output key-value pairs are serialized by Hive serdes,  while I hope
>>> that can be a human-readable text instead,  how can i define this table when
>>> creating?
>>>
>>> Min
>>>
>>> On Thu, Jun 4, 2009 at 1:48 PM, Zheng Shao <zs...@gmail.com> wrote:
>>>
>>>> No, we would need to copy the file back from HDFS. But I think there is
>>>> no overhead - we are doing the same thing as INSERT OVERWRITE LOCAL
>>>> DIRECTORY, I think.
>>>>
>>>> Zheng
>>>>
>>>>
>>>> On Wed, Jun 3, 2009 at 10:45 PM, Min Zhou <co...@gmail.com> wrote:
>>>>
>>>>> Can external table stored at a local directory?
>>>>>
>>>>>
>>>>> On Thu, Jun 4, 2009 at 1:42 PM, Zheng Shao <zs...@gmail.com> wrote:
>>>>>
>>>>>> You can first create an external table and then insert into that
>>>>>> table.
>>>>>>
>>>>>> Zheng
>>>>>>
>>>>>>
>>>>>> On Wed, Jun 3, 2009 at 10:31 PM, Min Zhou <co...@gmail.com>wrote:
>>>>>>
>>>>>>> Hi all,
>>>>>>>
>>>>>>> Any helps?
>>>>>>>
>>>>>>>
>>>>>>> thanks,
>>>>>>> Min
>>>>>>> --
>>>>>>> My research interests are distributed systems, parallel computing and
>>>>>>> bytecode based virtual machine.
>>>>>>>
>>>>>>> My profile:
>>>>>>> http://www.linkedin.com/in/coderplay
>>>>>>> My blog:
>>>>>>> http://coderplay.javaeye.com
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Yours,
>>>>>> Zheng
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> My research interests are distributed systems, parallel computing and
>>>>> bytecode based virtual machine.
>>>>>
>>>>> My profile:
>>>>> http://www.linkedin.com/in/coderplay
>>>>> My blog:
>>>>> http://coderplay.javaeye.com
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Yours,
>>>> Zheng
>>>>
>>>
>>>
>>>
>>> --
>>> My research interests are distributed systems, parallel computing and
>>> bytecode based virtual machine.
>>>
>>> My profile:
>>> http://www.linkedin.com/in/coderplay
>>> My blog:
>>> http://coderplay.javaeye.com
>>>
>>
>>
>>
>> --
>> Yours,
>> Zheng
>>
>
>
>
> --
> My research interests are distributed systems, parallel computing and
> bytecode based virtual machine.
>
> My profile:
> http://www.linkedin.com/in/coderplay
> My blog:
> http://coderplay.javaeye.com
>



-- 
Yours,
Zheng

Re: How to define the format of files outputed by command INSERT OVERWRITE LOCAL DIRECTORY?

Posted by Min Zhou <co...@gmail.com>.
I created a table similar with yours,

CREATE EXTERNAL TABLE staticacs(
  time string,
  application string,
  count1 int,
  count2 int)
PARTITIONED BY (dt STRING)
ROW FORMAT DELIMITED FIELDS TERMINATED BY '"'
STORED AS TEXTFILE;

but I found files named *.deflate in directory
'warehouse/staticacs/dt=20090531/' are not flat text files,  they were
unreadable.

Min

On Thu, Jun 4, 2009 at 2:16 PM, Zheng Shao <zs...@gmail.com> wrote:

> CREATE EXTERNAL TABLE abc ( a string, b string )
>   ROW FORMAT DELIMITED
>   FIELDS TERMINATED BY '\t'
>   STORED AS TEXTFILE
>   LOCATION '/user/mzhou/table_abc';
>
> Zheng
>
>
> On Wed, Jun 3, 2009 at 11:04 PM, Min Zhou <co...@gmail.com> wrote:
>
>> Thanks,  got.
>> Since output key-value pairs are serialized by Hive serdes,  while I hope
>> that can be a human-readable text instead,  how can i define this table when
>> creating?
>>
>> Min
>>
>> On Thu, Jun 4, 2009 at 1:48 PM, Zheng Shao <zs...@gmail.com> wrote:
>>
>>> No, we would need to copy the file back from HDFS. But I think there is
>>> no overhead - we are doing the same thing as INSERT OVERWRITE LOCAL
>>> DIRECTORY, I think.
>>>
>>> Zheng
>>>
>>>
>>> On Wed, Jun 3, 2009 at 10:45 PM, Min Zhou <co...@gmail.com> wrote:
>>>
>>>> Can external table stored at a local directory?
>>>>
>>>>
>>>> On Thu, Jun 4, 2009 at 1:42 PM, Zheng Shao <zs...@gmail.com> wrote:
>>>>
>>>>> You can first create an external table and then insert into that table.
>>>>>
>>>>> Zheng
>>>>>
>>>>>
>>>>> On Wed, Jun 3, 2009 at 10:31 PM, Min Zhou <co...@gmail.com> wrote:
>>>>>
>>>>>> Hi all,
>>>>>>
>>>>>> Any helps?
>>>>>>
>>>>>>
>>>>>> thanks,
>>>>>> Min
>>>>>> --
>>>>>> My research interests are distributed systems, parallel computing and
>>>>>> bytecode based virtual machine.
>>>>>>
>>>>>> My profile:
>>>>>> http://www.linkedin.com/in/coderplay
>>>>>> My blog:
>>>>>> http://coderplay.javaeye.com
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Yours,
>>>>> Zheng
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> My research interests are distributed systems, parallel computing and
>>>> bytecode based virtual machine.
>>>>
>>>> My profile:
>>>> http://www.linkedin.com/in/coderplay
>>>> My blog:
>>>> http://coderplay.javaeye.com
>>>>
>>>
>>>
>>>
>>> --
>>> Yours,
>>> Zheng
>>>
>>
>>
>>
>> --
>> My research interests are distributed systems, parallel computing and
>> bytecode based virtual machine.
>>
>> My profile:
>> http://www.linkedin.com/in/coderplay
>> My blog:
>> http://coderplay.javaeye.com
>>
>
>
>
> --
> Yours,
> Zheng
>



-- 
My research interests are distributed systems, parallel computing and
bytecode based virtual machine.

My profile:
http://www.linkedin.com/in/coderplay
My blog:
http://coderplay.javaeye.com

Re: How to define the format of files outputed by command INSERT OVERWRITE LOCAL DIRECTORY?

Posted by Zheng Shao <zs...@gmail.com>.
CREATE EXTERNAL TABLE abc ( a string, b string )
  ROW FORMAT DELIMITED
  FIELDS TERMINATED BY '\t'
  STORED AS TEXTFILE
  LOCATION '/user/mzhou/table_abc';

Zheng

On Wed, Jun 3, 2009 at 11:04 PM, Min Zhou <co...@gmail.com> wrote:

> Thanks,  got.
> Since output key-value pairs are serialized by Hive serdes,  while I hope
> that can be a human-readable text instead,  how can i define this table when
> creating?
>
> Min
>
> On Thu, Jun 4, 2009 at 1:48 PM, Zheng Shao <zs...@gmail.com> wrote:
>
>> No, we would need to copy the file back from HDFS. But I think there is no
>> overhead - we are doing the same thing as INSERT OVERWRITE LOCAL DIRECTORY,
>> I think.
>>
>> Zheng
>>
>>
>> On Wed, Jun 3, 2009 at 10:45 PM, Min Zhou <co...@gmail.com> wrote:
>>
>>> Can external table stored at a local directory?
>>>
>>>
>>> On Thu, Jun 4, 2009 at 1:42 PM, Zheng Shao <zs...@gmail.com> wrote:
>>>
>>>> You can first create an external table and then insert into that table.
>>>>
>>>> Zheng
>>>>
>>>>
>>>> On Wed, Jun 3, 2009 at 10:31 PM, Min Zhou <co...@gmail.com> wrote:
>>>>
>>>>> Hi all,
>>>>>
>>>>> Any helps?
>>>>>
>>>>>
>>>>> thanks,
>>>>> Min
>>>>> --
>>>>> My research interests are distributed systems, parallel computing and
>>>>> bytecode based virtual machine.
>>>>>
>>>>> My profile:
>>>>> http://www.linkedin.com/in/coderplay
>>>>> My blog:
>>>>> http://coderplay.javaeye.com
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Yours,
>>>> Zheng
>>>>
>>>
>>>
>>>
>>> --
>>> My research interests are distributed systems, parallel computing and
>>> bytecode based virtual machine.
>>>
>>> My profile:
>>> http://www.linkedin.com/in/coderplay
>>> My blog:
>>> http://coderplay.javaeye.com
>>>
>>
>>
>>
>> --
>> Yours,
>> Zheng
>>
>
>
>
> --
> My research interests are distributed systems, parallel computing and
> bytecode based virtual machine.
>
> My profile:
> http://www.linkedin.com/in/coderplay
> My blog:
> http://coderplay.javaeye.com
>



-- 
Yours,
Zheng

Re: How to define the format of files outputed by command INSERT OVERWRITE LOCAL DIRECTORY?

Posted by Min Zhou <co...@gmail.com>.
Thanks,  got.
Since output key-value pairs are serialized by Hive serdes,  while I hope
that can be a human-readable text instead,  how can i define this table when
creating?

Min
On Thu, Jun 4, 2009 at 1:48 PM, Zheng Shao <zs...@gmail.com> wrote:

> No, we would need to copy the file back from HDFS. But I think there is no
> overhead - we are doing the same thing as INSERT OVERWRITE LOCAL DIRECTORY,
> I think.
>
> Zheng
>
>
> On Wed, Jun 3, 2009 at 10:45 PM, Min Zhou <co...@gmail.com> wrote:
>
>> Can external table stored at a local directory?
>>
>>
>> On Thu, Jun 4, 2009 at 1:42 PM, Zheng Shao <zs...@gmail.com> wrote:
>>
>>> You can first create an external table and then insert into that table.
>>>
>>> Zheng
>>>
>>>
>>> On Wed, Jun 3, 2009 at 10:31 PM, Min Zhou <co...@gmail.com> wrote:
>>>
>>>> Hi all,
>>>>
>>>> Any helps?
>>>>
>>>>
>>>> thanks,
>>>> Min
>>>> --
>>>> My research interests are distributed systems, parallel computing and
>>>> bytecode based virtual machine.
>>>>
>>>> My profile:
>>>> http://www.linkedin.com/in/coderplay
>>>> My blog:
>>>> http://coderplay.javaeye.com
>>>>
>>>
>>>
>>>
>>> --
>>> Yours,
>>> Zheng
>>>
>>
>>
>>
>> --
>> My research interests are distributed systems, parallel computing and
>> bytecode based virtual machine.
>>
>> My profile:
>> http://www.linkedin.com/in/coderplay
>> My blog:
>> http://coderplay.javaeye.com
>>
>
>
>
> --
> Yours,
> Zheng
>



-- 
My research interests are distributed systems, parallel computing and
bytecode based virtual machine.

My profile:
http://www.linkedin.com/in/coderplay
My blog:
http://coderplay.javaeye.com

Re: How to define the format of files outputed by command INSERT OVERWRITE LOCAL DIRECTORY?

Posted by Zheng Shao <zs...@gmail.com>.
No, we would need to copy the file back from HDFS. But I think there is no
overhead - we are doing the same thing as INSERT OVERWRITE LOCAL DIRECTORY,
I think.

Zheng

On Wed, Jun 3, 2009 at 10:45 PM, Min Zhou <co...@gmail.com> wrote:

> Can external table stored at a local directory?
>
>
> On Thu, Jun 4, 2009 at 1:42 PM, Zheng Shao <zs...@gmail.com> wrote:
>
>> You can first create an external table and then insert into that table.
>>
>> Zheng
>>
>>
>> On Wed, Jun 3, 2009 at 10:31 PM, Min Zhou <co...@gmail.com> wrote:
>>
>>> Hi all,
>>>
>>> Any helps?
>>>
>>>
>>> thanks,
>>> Min
>>> --
>>> My research interests are distributed systems, parallel computing and
>>> bytecode based virtual machine.
>>>
>>> My profile:
>>> http://www.linkedin.com/in/coderplay
>>> My blog:
>>> http://coderplay.javaeye.com
>>>
>>
>>
>>
>> --
>> Yours,
>> Zheng
>>
>
>
>
> --
> My research interests are distributed systems, parallel computing and
> bytecode based virtual machine.
>
> My profile:
> http://www.linkedin.com/in/coderplay
> My blog:
> http://coderplay.javaeye.com
>



-- 
Yours,
Zheng

Re: How to define the format of files outputed by command INSERT OVERWRITE LOCAL DIRECTORY?

Posted by Min Zhou <co...@gmail.com>.
Can external table stored at a local directory?

On Thu, Jun 4, 2009 at 1:42 PM, Zheng Shao <zs...@gmail.com> wrote:

> You can first create an external table and then insert into that table.
>
> Zheng
>
>
> On Wed, Jun 3, 2009 at 10:31 PM, Min Zhou <co...@gmail.com> wrote:
>
>> Hi all,
>>
>> Any helps?
>>
>>
>> thanks,
>> Min
>> --
>> My research interests are distributed systems, parallel computing and
>> bytecode based virtual machine.
>>
>> My profile:
>> http://www.linkedin.com/in/coderplay
>> My blog:
>> http://coderplay.javaeye.com
>>
>
>
>
> --
> Yours,
> Zheng
>



-- 
My research interests are distributed systems, parallel computing and
bytecode based virtual machine.

My profile:
http://www.linkedin.com/in/coderplay
My blog:
http://coderplay.javaeye.com

Re: How to define the format of files outputed by command INSERT OVERWRITE LOCAL DIRECTORY?

Posted by Zheng Shao <zs...@gmail.com>.
You can first create an external table and then insert into that table.

Zheng

On Wed, Jun 3, 2009 at 10:31 PM, Min Zhou <co...@gmail.com> wrote:

> Hi all,
>
> Any helps?
>
>
> thanks,
> Min
> --
> My research interests are distributed systems, parallel computing and
> bytecode based virtual machine.
>
> My profile:
> http://www.linkedin.com/in/coderplay
> My blog:
> http://coderplay.javaeye.com
>



-- 
Yours,
Zheng