You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Joydeep Sen Sarma (JIRA)" <ji...@apache.org> on 2010/11/09 02:00:19 UTC

[jira] Created: (HIVE-1778) simultaneously launched queries collide on hive intermediate directories

simultaneously launched queries collide on hive intermediate directories
------------------------------------------------------------------------

                 Key: HIVE-1778
                 URL: https://issues.apache.org/jira/browse/HIVE-1778
             Project: Hive
          Issue Type: Bug
            Reporter: Joydeep Sen Sarma


we saw one instance of multiple queries for the same user launched in parallel (from a workflow engine) use the same intermediate directories. which is obviously super bad but not suprising considering how we allocate them:

   Random rand = new Random();
  String executionId = "hive_" + format.format(new Date()) + "_"  + Math.abs(rand.nextLong());

 Java documentation says: Two Random objects created within the same millisecond will have the same sequence of random numbers.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (HIVE-1778) simultaneously launched queries collide on hive intermediate directories

Posted by "Edward Capriolo (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-1778?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Edward Capriolo reassigned HIVE-1778:
-------------------------------------

    Assignee: Edward Capriolo

> simultaneously launched queries collide on hive intermediate directories
> ------------------------------------------------------------------------
>
>                 Key: HIVE-1778
>                 URL: https://issues.apache.org/jira/browse/HIVE-1778
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Joydeep Sen Sarma
>            Assignee: Edward Capriolo
>
> we saw one instance of multiple queries for the same user launched in parallel (from a workflow engine) use the same intermediate directories. which is obviously super bad but not suprising considering how we allocate them:
>    Random rand = new Random();
>   String executionId = "hive_" + format.format(new Date()) + "_"  + Math.abs(rand.nextLong());
>  Java documentation says: Two Random objects created within the same millisecond will have the same sequence of random numbers.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HIVE-1778) simultaneously launched queries collide on hive intermediate directories

Posted by "Bennie Schut (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-1778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12969227#action_12969227 ] 

Bennie Schut commented on HIVE-1778:
------------------------------------

Perhaps related to HIVE-1019 In that case we use aa UUID which works great for this stuff.

> simultaneously launched queries collide on hive intermediate directories
> ------------------------------------------------------------------------
>
>                 Key: HIVE-1778
>                 URL: https://issues.apache.org/jira/browse/HIVE-1778
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Joydeep Sen Sarma
>            Assignee: Edward Capriolo
>
> we saw one instance of multiple queries for the same user launched in parallel (from a workflow engine) use the same intermediate directories. which is obviously super bad but not suprising considering how we allocate them:
>    Random rand = new Random();
>   String executionId = "hive_" + format.format(new Date()) + "_"  + Math.abs(rand.nextLong());
>  Java documentation says: Two Random objects created within the same millisecond will have the same sequence of random numbers.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HIVE-1778) simultaneously launched queries collide on hive intermediate directories

Posted by "Joydeep Sen Sarma (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-1778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12968859#action_12968859 ] 

Joydeep Sen Sarma commented on HIVE-1778:
-----------------------------------------

whatever works - we could pass in hash the query string and time (perhaps a nanosecond timer) to come up with a better seed for the random generator for example.

> simultaneously launched queries collide on hive intermediate directories
> ------------------------------------------------------------------------
>
>                 Key: HIVE-1778
>                 URL: https://issues.apache.org/jira/browse/HIVE-1778
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Joydeep Sen Sarma
>            Assignee: Edward Capriolo
>
> we saw one instance of multiple queries for the same user launched in parallel (from a workflow engine) use the same intermediate directories. which is obviously super bad but not suprising considering how we allocate them:
>    Random rand = new Random();
>   String executionId = "hive_" + format.format(new Date()) + "_"  + Math.abs(rand.nextLong());
>  Java documentation says: Two Random objects created within the same millisecond will have the same sequence of random numbers.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HIVE-1778) simultaneously launched queries collide on hive intermediate directories

Posted by "Edward Capriolo (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-1778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12968834#action_12968834 ] 

Edward Capriolo commented on HIVE-1778:
---------------------------------------

Joydeep,

Do you want to use SecureRandom or possibly use an internal static counter for these ids?

> simultaneously launched queries collide on hive intermediate directories
> ------------------------------------------------------------------------
>
>                 Key: HIVE-1778
>                 URL: https://issues.apache.org/jira/browse/HIVE-1778
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Joydeep Sen Sarma
>            Assignee: Edward Capriolo
>
> we saw one instance of multiple queries for the same user launched in parallel (from a workflow engine) use the same intermediate directories. which is obviously super bad but not suprising considering how we allocate them:
>    Random rand = new Random();
>   String executionId = "hive_" + format.format(new Date()) + "_"  + Math.abs(rand.nextLong());
>  Java documentation says: Two Random objects created within the same millisecond will have the same sequence of random numbers.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.