You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Edward Capriolo (JIRA)" <ji...@apache.org> on 2009/08/03 04:51:15 UTC

[jira] Created: (HIVE-716) Web Interface wait/notify, interface changes

Web Interface wait/notify, interface changes
--------------------------------------------

                 Key: HIVE-716
                 URL: https://issues.apache.org/jira/browse/HIVE-716
             Project: Hadoop Hive
          Issue Type: Improvement
          Components: Web UI
         Environment: All
            Reporter: Edward Capriolo
            Assignee: Edward Capriolo


In TestHWISessionItem 

Asserts are backwards
{noformat}
assertEquals(  searchItem.getQueryRet(), 0);
{noformat}
Should be
{noformat}
assertEquals( zero , searchItem.getQueryRet());
{noformat}

Wait/notify semantics can be added. This is helpful for end user, and cleaner in the test case.

{noformat}
while (user1_item2.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
  Thread.sleep(1);
}
{noformat}

{noformat}
synchronized (user1_item2.runnable) {
  while (user1_item2.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
     user1_item2.runnable.wait();
  }
}
{noformat}

The text box in the web interface should accept multiple queries separated by ';' like the cli does. This will add more usability. No need for separate set processor pages. 

setQuery(String) is replaced by setQueries(List<String>)

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


[jira] Updated: (HIVE-716) Web Interface wait/notify, interface changes

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

Edward Capriolo updated HIVE-716:
---------------------------------

    Attachment: hive-716-2.diff

Implemented many changes. The web source has not been modified to reflect the changes. I should have a final tested patch within the week.

> Web Interface wait/notify, interface changes
> --------------------------------------------
>
>                 Key: HIVE-716
>                 URL: https://issues.apache.org/jira/browse/HIVE-716
>             Project: Hadoop Hive
>          Issue Type: Improvement
>          Components: Web UI
>         Environment: All
>            Reporter: Edward Capriolo
>            Assignee: Edward Capriolo
>         Attachments: hive-716-2.diff, hive-716.diff
>
>
> In TestHWISessionItem 
> Asserts are backwards
> {noformat}
> assertEquals(  searchItem.getQueryRet(), 0);
> {noformat}
> Should be
> {noformat}
> assertEquals( zero , searchItem.getQueryRet());
> {noformat}
> Wait/notify semantics can be added. This is helpful for end user, and cleaner in the test case.
> {noformat}
> while (user1_item2.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
>   Thread.sleep(1);
> }
> {noformat}
> {noformat}
> synchronized (user1_item2.runnable) {
>   while (user1_item2.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
>      user1_item2.runnable.wait();
>   }
> }
> {noformat}
> The text box in the web interface should accept multiple queries separated by ';' like the cli does. This will add more usability. No need for separate set processor pages. 
> setQuery(String) is replaced by setQueries(List<String>)

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


[jira] Updated: (HIVE-716) Web Interface wait/notify, interface changes

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

Edward Capriolo updated HIVE-716:
---------------------------------

    Attachment: hive-716-4.diff

Fixed the bug where processors are being fed the query without first token. Also session_result.jsp was missing making viewing the new session bucket impossible.

> Web Interface wait/notify, interface changes
> --------------------------------------------
>
>                 Key: HIVE-716
>                 URL: https://issues.apache.org/jira/browse/HIVE-716
>             Project: Hadoop Hive
>          Issue Type: Improvement
>          Components: Web UI
>         Environment: All
>            Reporter: Edward Capriolo
>            Assignee: Edward Capriolo
>         Attachments: hive-716-2.diff, hive-716-3.diff, hive-716-4.diff, hive-716.diff, hwi_query_box.png
>
>
> In TestHWISessionItem 
> Asserts are backwards
> {noformat}
> assertEquals(  searchItem.getQueryRet(), 0);
> {noformat}
> Should be
> {noformat}
> assertEquals( zero , searchItem.getQueryRet());
> {noformat}
> Wait/notify semantics can be added. This is helpful for end user, and cleaner in the test case.
> {noformat}
> while (user1_item2.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
>   Thread.sleep(1);
> }
> {noformat}
> {noformat}
> synchronized (user1_item2.runnable) {
>   while (user1_item2.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
>      user1_item2.runnable.wait();
>   }
> }
> {noformat}
> The text box in the web interface should accept multiple queries separated by ';' like the cli does. This will add more usability. No need for separate set processor pages. 
> setQuery(String) is replaced by setQueries(List<String>)

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


[jira] Updated: (HIVE-716) Web Interface wait/notify, interface changes

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

Edward Capriolo updated HIVE-716:
---------------------------------

    Attachment: hive-716.diff

All relevant changes to the HWISessionItem. This still needs some testing, but does anyone have early comments?

> Web Interface wait/notify, interface changes
> --------------------------------------------
>
>                 Key: HIVE-716
>                 URL: https://issues.apache.org/jira/browse/HIVE-716
>             Project: Hadoop Hive
>          Issue Type: Improvement
>          Components: Web UI
>         Environment: All
>            Reporter: Edward Capriolo
>            Assignee: Edward Capriolo
>         Attachments: hive-716.diff
>
>
> In TestHWISessionItem 
> Asserts are backwards
> {noformat}
> assertEquals(  searchItem.getQueryRet(), 0);
> {noformat}
> Should be
> {noformat}
> assertEquals( zero , searchItem.getQueryRet());
> {noformat}
> Wait/notify semantics can be added. This is helpful for end user, and cleaner in the test case.
> {noformat}
> while (user1_item2.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
>   Thread.sleep(1);
> }
> {noformat}
> {noformat}
> synchronized (user1_item2.runnable) {
>   while (user1_item2.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
>      user1_item2.runnable.wait();
>   }
> }
> {noformat}
> The text box in the web interface should accept multiple queries separated by ';' like the cli does. This will add more usability. No need for separate set processor pages. 
> setQuery(String) is replaced by setQueries(List<String>)

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


[jira] Commented: (HIVE-716) Web Interface wait/notify, interface changes

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

Edward Capriolo commented on HIVE-716:
--------------------------------------

Namit,

Thank you for look at this. 

It seems to be failing because other tests in QL have not cleaned up after themselves one example is nullscript.q.out. How does the contract of the test cases work? Should a TestCase be able to assume the metastore and test data directory is clean?

> Web Interface wait/notify, interface changes
> --------------------------------------------
>
>                 Key: HIVE-716
>                 URL: https://issues.apache.org/jira/browse/HIVE-716
>             Project: Hadoop Hive
>          Issue Type: Improvement
>          Components: Web UI
>         Environment: All
>            Reporter: Edward Capriolo
>            Assignee: Edward Capriolo
>         Attachments: hive-716-2.diff, hive-716-3.diff, hive-716-4.diff, hive-716-5.diff, hive-716.diff, hwi_query_box.png
>
>
> In TestHWISessionItem 
> Asserts are backwards
> {noformat}
> assertEquals(  searchItem.getQueryRet(), 0);
> {noformat}
> Should be
> {noformat}
> assertEquals( zero , searchItem.getQueryRet());
> {noformat}
> Wait/notify semantics can be added. This is helpful for end user, and cleaner in the test case.
> {noformat}
> while (user1_item2.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
>   Thread.sleep(1);
> }
> {noformat}
> {noformat}
> synchronized (user1_item2.runnable) {
>   while (user1_item2.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
>      user1_item2.runnable.wait();
>   }
> }
> {noformat}
> The text box in the web interface should accept multiple queries separated by ';' like the cli does. This will add more usability. No need for separate set processor pages. 
> setQuery(String) is replaced by setQueries(List<String>)

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


[jira] Commented: (HIVE-716) Web Interface wait/notify, interface changes

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

Edward Capriolo commented on HIVE-716:
--------------------------------------

Also this is being showed because I added a query show tables. Instead I could add show tables where name like test_hiw_table. The result will be predictable and we sont have to clean right away

> Web Interface wait/notify, interface changes
> --------------------------------------------
>
>                 Key: HIVE-716
>                 URL: https://issues.apache.org/jira/browse/HIVE-716
>             Project: Hadoop Hive
>          Issue Type: Improvement
>          Components: Web UI
>         Environment: All
>            Reporter: Edward Capriolo
>            Assignee: Edward Capriolo
>         Attachments: hive-716-2.diff, hive-716-3.diff, hive-716-4.diff, hive-716-5.diff, hive-716.diff, hwi_query_box.png
>
>
> In TestHWISessionItem 
> Asserts are backwards
> {noformat}
> assertEquals(  searchItem.getQueryRet(), 0);
> {noformat}
> Should be
> {noformat}
> assertEquals( zero , searchItem.getQueryRet());
> {noformat}
> Wait/notify semantics can be added. This is helpful for end user, and cleaner in the test case.
> {noformat}
> while (user1_item2.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
>   Thread.sleep(1);
> }
> {noformat}
> {noformat}
> synchronized (user1_item2.runnable) {
>   while (user1_item2.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
>      user1_item2.runnable.wait();
>   }
> }
> {noformat}
> The text box in the web interface should accept multiple queries separated by ';' like the cli does. This will add more usability. No need for separate set processor pages. 
> setQuery(String) is replaced by setQueries(List<String>)

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


[jira] Commented: (HIVE-716) Web Interface wait/notify, interface changes

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

Edward Capriolo commented on HIVE-716:
--------------------------------------

Great news. My secret codename for the patch you applied is 'HWI the Next Generation'. The ResultBucket and the ability to specify multiple queries at once really ups the usability. Let me know any other things you may notice. I am not sure if the new features are going to appear in separate patches or one larger one, but the net result will be what you have now.

> Web Interface wait/notify, interface changes
> --------------------------------------------
>
>                 Key: HIVE-716
>                 URL: https://issues.apache.org/jira/browse/HIVE-716
>             Project: Hadoop Hive
>          Issue Type: Improvement
>          Components: Web UI
>         Environment: All
>            Reporter: Edward Capriolo
>            Assignee: Edward Capriolo
>         Attachments: hive-716-2.diff, hive-716-3.diff, hive-716-4.diff, hive-716.diff, hwi_query_box.png
>
>
> In TestHWISessionItem 
> Asserts are backwards
> {noformat}
> assertEquals(  searchItem.getQueryRet(), 0);
> {noformat}
> Should be
> {noformat}
> assertEquals( zero , searchItem.getQueryRet());
> {noformat}
> Wait/notify semantics can be added. This is helpful for end user, and cleaner in the test case.
> {noformat}
> while (user1_item2.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
>   Thread.sleep(1);
> }
> {noformat}
> {noformat}
> synchronized (user1_item2.runnable) {
>   while (user1_item2.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
>      user1_item2.runnable.wait();
>   }
> }
> {noformat}
> The text box in the web interface should accept multiple queries separated by ';' like the cli does. This will add more usability. No need for separate set processor pages. 
> setQuery(String) is replaced by setQueries(List<String>)

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


[jira] Updated: (HIVE-716) Web Interface wait/notify, interface changes

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

Namit Jain updated HIVE-716:
----------------------------

       Resolution: Fixed
    Fix Version/s: 0.5.0
     Hadoop Flags: [Reviewed]
           Status: Resolved  (was: Patch Available)

Committed. Thanks Edward

> Web Interface wait/notify, interface changes
> --------------------------------------------
>
>                 Key: HIVE-716
>                 URL: https://issues.apache.org/jira/browse/HIVE-716
>             Project: Hadoop Hive
>          Issue Type: Improvement
>          Components: Web UI
>         Environment: All
>            Reporter: Edward Capriolo
>            Assignee: Edward Capriolo
>             Fix For: 0.5.0
>
>         Attachments: hive-716-2.diff, hive-716-3.diff, hive-716-4.diff, hive-716-5.diff, hive-716-6.diff, hive-716.diff, hwi_query_box.png
>
>
> In TestHWISessionItem 
> Asserts are backwards
> {noformat}
> assertEquals(  searchItem.getQueryRet(), 0);
> {noformat}
> Should be
> {noformat}
> assertEquals( zero , searchItem.getQueryRet());
> {noformat}
> Wait/notify semantics can be added. This is helpful for end user, and cleaner in the test case.
> {noformat}
> while (user1_item2.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
>   Thread.sleep(1);
> }
> {noformat}
> {noformat}
> synchronized (user1_item2.runnable) {
>   while (user1_item2.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
>      user1_item2.runnable.wait();
>   }
> }
> {noformat}
> The text box in the web interface should accept multiple queries separated by ';' like the cli does. This will add more usability. No need for separate set processor pages. 
> setQuery(String) is replaced by setQueries(List<String>)

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


[jira] Commented: (HIVE-716) Web Interface wait/notify, interface changes

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

Vijay commented on HIVE-716:
----------------------------

Hi, I tried the latest patch on trunk and there seems to be a problem.

I was interested in using the "add jar " command to add jar files to the path. However, by the time the command flows through the SessionState to the AddResourceProcessor (in ./ql/src/java/org/apache/hadoop/hive/ql/processors/AddResourceProcessor.java), the command word "add" is not being stripped so the resource processor is trying to find a ResourceType of "ADD."

I'm not sure if this was an existing bug or was a result of the current set of changes.

> Web Interface wait/notify, interface changes
> --------------------------------------------
>
>                 Key: HIVE-716
>                 URL: https://issues.apache.org/jira/browse/HIVE-716
>             Project: Hadoop Hive
>          Issue Type: Improvement
>          Components: Web UI
>         Environment: All
>            Reporter: Edward Capriolo
>            Assignee: Edward Capriolo
>         Attachments: hive-716-2.diff, hive-716-3.diff, hive-716.diff, hwi_query_box.png
>
>
> In TestHWISessionItem 
> Asserts are backwards
> {noformat}
> assertEquals(  searchItem.getQueryRet(), 0);
> {noformat}
> Should be
> {noformat}
> assertEquals( zero , searchItem.getQueryRet());
> {noformat}
> Wait/notify semantics can be added. This is helpful for end user, and cleaner in the test case.
> {noformat}
> while (user1_item2.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
>   Thread.sleep(1);
> }
> {noformat}
> {noformat}
> synchronized (user1_item2.runnable) {
>   while (user1_item2.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
>      user1_item2.runnable.wait();
>   }
> }
> {noformat}
> The text box in the web interface should accept multiple queries separated by ';' like the cli does. This will add more usability. No need for separate set processor pages. 
> setQuery(String) is replaced by setQueries(List<String>)

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


[jira] Commented: (HIVE-716) Web Interface wait/notify, interface changes

Posted by "Ashish Thusoo (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12744139#action_12744139 ] 

Ashish Thusoo commented on HIVE-716:
------------------------------------

Will check this out tonight. Does this have to go into 0.4 or can this go only into trunk?

> Web Interface wait/notify, interface changes
> --------------------------------------------
>
>                 Key: HIVE-716
>                 URL: https://issues.apache.org/jira/browse/HIVE-716
>             Project: Hadoop Hive
>          Issue Type: Improvement
>          Components: Web UI
>         Environment: All
>            Reporter: Edward Capriolo
>            Assignee: Edward Capriolo
>         Attachments: hive-716-2.diff, hive-716-3.diff, hive-716.diff, hwi_query_box.png
>
>
> In TestHWISessionItem 
> Asserts are backwards
> {noformat}
> assertEquals(  searchItem.getQueryRet(), 0);
> {noformat}
> Should be
> {noformat}
> assertEquals( zero , searchItem.getQueryRet());
> {noformat}
> Wait/notify semantics can be added. This is helpful for end user, and cleaner in the test case.
> {noformat}
> while (user1_item2.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
>   Thread.sleep(1);
> }
> {noformat}
> {noformat}
> synchronized (user1_item2.runnable) {
>   while (user1_item2.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
>      user1_item2.runnable.wait();
>   }
> }
> {noformat}
> The text box in the web interface should accept multiple queries separated by ';' like the cli does. This will add more usability. No need for separate set processor pages. 
> setQuery(String) is replaced by setQueries(List<String>)

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


[jira] Updated: (HIVE-716) Web Interface wait/notify, interface changes

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

Edward Capriolo updated HIVE-716:
---------------------------------

    Attachment: hive-716-5.diff

Namit,

Hive-752 and hive-716 are mutually exclusive actually. This patch did not need to be regenerated. I did this anyway because I had added a few license headers that were missed.

I am going to open a cosmetic Jira to fix all the indents/license to be done after this commit .

> Web Interface wait/notify, interface changes
> --------------------------------------------
>
>                 Key: HIVE-716
>                 URL: https://issues.apache.org/jira/browse/HIVE-716
>             Project: Hadoop Hive
>          Issue Type: Improvement
>          Components: Web UI
>         Environment: All
>            Reporter: Edward Capriolo
>            Assignee: Edward Capriolo
>         Attachments: hive-716-2.diff, hive-716-3.diff, hive-716-4.diff, hive-716-5.diff, hive-716.diff, hwi_query_box.png
>
>
> In TestHWISessionItem 
> Asserts are backwards
> {noformat}
> assertEquals(  searchItem.getQueryRet(), 0);
> {noformat}
> Should be
> {noformat}
> assertEquals( zero , searchItem.getQueryRet());
> {noformat}
> Wait/notify semantics can be added. This is helpful for end user, and cleaner in the test case.
> {noformat}
> while (user1_item2.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
>   Thread.sleep(1);
> }
> {noformat}
> {noformat}
> synchronized (user1_item2.runnable) {
>   while (user1_item2.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
>      user1_item2.runnable.wait();
>   }
> }
> {noformat}
> The text box in the web interface should accept multiple queries separated by ';' like the cli does. This will add more usability. No need for separate set processor pages. 
> setQuery(String) is replaced by setQueries(List<String>)

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


[jira] Commented: (HIVE-716) Web Interface wait/notify, interface changes

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

Edward Capriolo commented on HIVE-716:
--------------------------------------

This is a new bug. The old code only supported the set processor. Ill get in another patch quickly for you.

> Web Interface wait/notify, interface changes
> --------------------------------------------
>
>                 Key: HIVE-716
>                 URL: https://issues.apache.org/jira/browse/HIVE-716
>             Project: Hadoop Hive
>          Issue Type: Improvement
>          Components: Web UI
>         Environment: All
>            Reporter: Edward Capriolo
>            Assignee: Edward Capriolo
>         Attachments: hive-716-2.diff, hive-716-3.diff, hive-716.diff, hwi_query_box.png
>
>
> In TestHWISessionItem 
> Asserts are backwards
> {noformat}
> assertEquals(  searchItem.getQueryRet(), 0);
> {noformat}
> Should be
> {noformat}
> assertEquals( zero , searchItem.getQueryRet());
> {noformat}
> Wait/notify semantics can be added. This is helpful for end user, and cleaner in the test case.
> {noformat}
> while (user1_item2.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
>   Thread.sleep(1);
> }
> {noformat}
> {noformat}
> synchronized (user1_item2.runnable) {
>   while (user1_item2.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
>      user1_item2.runnable.wait();
>   }
> }
> {noformat}
> The text box in the web interface should accept multiple queries separated by ';' like the cli does. This will add more usability. No need for separate set processor pages. 
> setQuery(String) is replaced by setQueries(List<String>)

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


[jira] Commented: (HIVE-716) Web Interface wait/notify, interface changes

Posted by "Shrijeet Paliwal (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12906129#action_12906129 ] 

Shrijeet Paliwal commented on HIVE-716:
---------------------------------------

I think we might have bug in HWISessionItem.java. 
I am referring to this change: http://svn.apache.org/viewvc/hadoop/hive/trunk/hwi/src/java/org/apache/hadoop/hive/hwi/HWISessionItem.java?r1=817845&r2=817844&pathrev=817845

Why was this line (343) commented out : res.clear();

This is making a query like : " select * from blah limit 1000 "  to return more that 1000 results (because results are not being flushed)

> Web Interface wait/notify, interface changes
> --------------------------------------------
>
>                 Key: HIVE-716
>                 URL: https://issues.apache.org/jira/browse/HIVE-716
>             Project: Hadoop Hive
>          Issue Type: Improvement
>          Components: Web UI
>         Environment: All
>            Reporter: Edward Capriolo
>            Assignee: Edward Capriolo
>             Fix For: 0.5.0
>
>         Attachments: hive-716-2.diff, hive-716-3.diff, hive-716-4.diff, hive-716-5.diff, hive-716-6.diff, hive-716.diff, hwi_query_box.png
>
>
> In TestHWISessionItem 
> Asserts are backwards
> {noformat}
> assertEquals(  searchItem.getQueryRet(), 0);
> {noformat}
> Should be
> {noformat}
> assertEquals( zero , searchItem.getQueryRet());
> {noformat}
> Wait/notify semantics can be added. This is helpful for end user, and cleaner in the test case.
> {noformat}
> while (user1_item2.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
>   Thread.sleep(1);
> }
> {noformat}
> {noformat}
> synchronized (user1_item2.runnable) {
>   while (user1_item2.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
>      user1_item2.runnable.wait();
>   }
> }
> {noformat}
> The text box in the web interface should accept multiple queries separated by ';' like the cli does. This will add more usability. No need for separate set processor pages. 
> setQuery(String) is replaced by setQueries(List<String>)

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


[jira] Commented: (HIVE-716) Web Interface wait/notify, interface changes

Posted by "Namit Jain (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12758090#action_12758090 ] 

Namit Jain commented on HIVE-716:
---------------------------------

The test TestHWISessionManager is failing when run as part of all tests

> Web Interface wait/notify, interface changes
> --------------------------------------------
>
>                 Key: HIVE-716
>                 URL: https://issues.apache.org/jira/browse/HIVE-716
>             Project: Hadoop Hive
>          Issue Type: Improvement
>          Components: Web UI
>         Environment: All
>            Reporter: Edward Capriolo
>            Assignee: Edward Capriolo
>         Attachments: hive-716-2.diff, hive-716-3.diff, hive-716-4.diff, hive-716-5.diff, hive-716.diff, hwi_query_box.png
>
>
> In TestHWISessionItem 
> Asserts are backwards
> {noformat}
> assertEquals(  searchItem.getQueryRet(), 0);
> {noformat}
> Should be
> {noformat}
> assertEquals( zero , searchItem.getQueryRet());
> {noformat}
> Wait/notify semantics can be added. This is helpful for end user, and cleaner in the test case.
> {noformat}
> while (user1_item2.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
>   Thread.sleep(1);
> }
> {noformat}
> {noformat}
> synchronized (user1_item2.runnable) {
>   while (user1_item2.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
>      user1_item2.runnable.wait();
>   }
> }
> {noformat}
> The text box in the web interface should accept multiple queries separated by ';' like the cli does. This will add more usability. No need for separate set processor pages. 
> setQuery(String) is replaced by setQueries(List<String>)

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


[jira] Updated: (HIVE-716) Web Interface wait/notify, interface changes

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

Edward Capriolo updated HIVE-716:
---------------------------------

    Status: Patch Available  (was: Open)

There were two main features I wanted to support in HWI.

1) The Query Box should allow multiple queries separated by ; This would make the application more user friendly.

2) For queries with small result sets such as 'explain' or 'show tables' should be able possible without dumping to a file

Wait/notify semantics

Loop w/sleep are ok but a Java threads support wait/notify so that is cleaner, nicer to code.
{noformat}
-               while (searchItem.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
-                       Thread.sleep(1);
+               synchronized (searchItem.runnable ) {
+                 while (searchItem.getStatus() != HWISessionItem.WebSessionItemStatus.READY) {
+                       searchItem.runnable.wait();
+                  }
{noformat}

HWISessionItem Constructor
{noformat}
protected HWISessionItem ()
{noformat}

{noformat}
public HWISessionItem(HWIAuth auth, String sessionName) 
{noformat}

Having a public constrcutor is a plus the class could theoretically be used standalone.
The no argument constructor did not make sense, HWISessionItem was programmed originally like a Java
Bean no arg, constructore, lots of setters/getters. Really to be instantaited this information is 
write once. It only makes sense to handle it in the constructor. (this also makes the lazy initialization easier)

state machine
{noformat}
-       public enum WebSessionItemStatus {
-               NEW, QUERY_SET, QUERY_RUNNING, QUERY_COMPLETE, DESTROY, KILL_QUERY
-       };
+  /**  Represents the state a session item can be in. */
+  public enum WebSessionItemStatus {
+    NEW, READY, QUERY_SET, QUERY_RUNNING, DESTROY, KILL_QUERY
+  };
{noformat}

THe state mechanics worked but the states were funky. QUERY_COMPLETE in particular bothered me. 

NEW-Constructed but not initialized
READY-Initialized waiting for query set
QUERY-SET-User has signaled that the query should be ran
Query-running- the query is now running (dont change anything)  
back to ready READY
DESTROY-Fall out of run loop

Right now  KILL_QUERY is not terribly effective. With HiveHistory session can be killed from the job tracker.

Removed private members w setters/getters
{noformat}
-       private SetProcessor sp;
-       private Driver qp;
{noformat}
These are not members they are only local to the runQuery() method

The framework now takes a list of queries and returns a list of results
{noformat}
+  private List<String>  queries;
+  queryRet = new ArrayList<Integer>();
{noformat}

Constructor blocks for lazy initiailization
There was a subtle bug in that the initialization of some variables happned in the thread after the constructor returned. However a redirect on
the web site could send a user onto a page causing an exception. Now the constructor uses wait/notify to properly wait for initialization
{noformat}
 l4j.debug("Wait for NEW->READY transition");
+    synchronized (this.runnable){
+      if (this.status != WebSessionItemStatus.READY) {
+       try {
+         this.runnable.wait();
+        } catch (Exception ex) {}
+      }
+    }
+    l4j.debug("NEW->READY transition complete");
{noformat}


run() uses state NEW not conf=null to detect when initialization is needed. Same effect more self documenting
{noformat}


 while (this.status != HWISessionItem.WebSessionItemStatus.DESTROY) {

             if (conf == null) {
-          this.itemInit();
-                               }

 while (this.status != HWISessionItem.WebSessionItemStatus.DESTROY) {
+        if (this.status == WebSessionItemStatus.NEW) {
+         this.itemInit();
        }
{noformat}

Feature Reuslt Bucket
a query like explain or show is not the type of thing you want to dump to a file just to look at the file.
The resultBucket is a sized buffer that saves some query results to make them avaialable from the web interface.
{noformat}
+            while (qp.getResults(res)) {
+             resultBucket.add(res);
+              if (resultBucket.size() > resultBucketMaxSize) 
+               resultBucket.remove(0);
+              for (String row : res) {
+               if (ss != null) { 
+                 if (ss.out != null) 
+                   ss.out.println(row);
{noformat}

Many changes went down here :) We could break this up into a few JIRA or bundle together. The last round of changes were a good at cleanup up the SessionManager this round will have the SessionItem nicely polished.

* Add ResultBucket buffer to web interface
* HWI to run multiple queries in a single run
* Changes to  HWI State Mechanics
* Web Interface format and license. 1 Propertly format and add apache licence to all HWI Source Files 

Please review and lets talk about the best way to procede.

Thanks,

> Web Interface wait/notify, interface changes
> --------------------------------------------
>
>                 Key: HIVE-716
>                 URL: https://issues.apache.org/jira/browse/HIVE-716
>             Project: Hadoop Hive
>          Issue Type: Improvement
>          Components: Web UI
>         Environment: All
>            Reporter: Edward Capriolo
>            Assignee: Edward Capriolo
>         Attachments: hive-716-2.diff, hive-716-3.diff, hive-716.diff, hwi_query_box.png
>
>
> In TestHWISessionItem 
> Asserts are backwards
> {noformat}
> assertEquals(  searchItem.getQueryRet(), 0);
> {noformat}
> Should be
> {noformat}
> assertEquals( zero , searchItem.getQueryRet());
> {noformat}
> Wait/notify semantics can be added. This is helpful for end user, and cleaner in the test case.
> {noformat}
> while (user1_item2.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
>   Thread.sleep(1);
> }
> {noformat}
> {noformat}
> synchronized (user1_item2.runnable) {
>   while (user1_item2.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
>      user1_item2.runnable.wait();
>   }
> }
> {noformat}
> The text box in the web interface should accept multiple queries separated by ';' like the cli does. This will add more usability. No need for separate set processor pages. 
> setQuery(String) is replaced by setQueries(List<String>)

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


[jira] Updated: (HIVE-716) Web Interface wait/notify, interface changes

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

Edward Capriolo updated HIVE-716:
---------------------------------

    Attachment: hive-716-6.diff

I made the query results deterministic by running

searchItem.addQuery("describe "+tableName);

instead of "show tables"

> Web Interface wait/notify, interface changes
> --------------------------------------------
>
>                 Key: HIVE-716
>                 URL: https://issues.apache.org/jira/browse/HIVE-716
>             Project: Hadoop Hive
>          Issue Type: Improvement
>          Components: Web UI
>         Environment: All
>            Reporter: Edward Capriolo
>            Assignee: Edward Capriolo
>         Attachments: hive-716-2.diff, hive-716-3.diff, hive-716-4.diff, hive-716-5.diff, hive-716-6.diff, hive-716.diff, hwi_query_box.png
>
>
> In TestHWISessionItem 
> Asserts are backwards
> {noformat}
> assertEquals(  searchItem.getQueryRet(), 0);
> {noformat}
> Should be
> {noformat}
> assertEquals( zero , searchItem.getQueryRet());
> {noformat}
> Wait/notify semantics can be added. This is helpful for end user, and cleaner in the test case.
> {noformat}
> while (user1_item2.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
>   Thread.sleep(1);
> }
> {noformat}
> {noformat}
> synchronized (user1_item2.runnable) {
>   while (user1_item2.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
>      user1_item2.runnable.wait();
>   }
> }
> {noformat}
> The text box in the web interface should accept multiple queries separated by ';' like the cli does. This will add more usability. No need for separate set processor pages. 
> setQuery(String) is replaced by setQueries(List<String>)

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


[jira] Commented: (HIVE-716) Web Interface wait/notify, interface changes

Posted by "Namit Jain (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12758299#action_12758299 ] 

Namit Jain commented on HIVE-716:
---------------------------------

Once you run any test or gen-test, you should see the following:

./build/ql/test/classes/org/apache/hadoop/hive/ql/hooks/PreExecutePrinter.class


check that, maybe that will give you some ideas.




> Web Interface wait/notify, interface changes
> --------------------------------------------
>
>                 Key: HIVE-716
>                 URL: https://issues.apache.org/jira/browse/HIVE-716
>             Project: Hadoop Hive
>          Issue Type: Improvement
>          Components: Web UI
>         Environment: All
>            Reporter: Edward Capriolo
>            Assignee: Edward Capriolo
>         Attachments: hive-716-2.diff, hive-716-3.diff, hive-716-4.diff, hive-716-5.diff, hive-716.diff, hwi_query_box.png
>
>
> In TestHWISessionItem 
> Asserts are backwards
> {noformat}
> assertEquals(  searchItem.getQueryRet(), 0);
> {noformat}
> Should be
> {noformat}
> assertEquals( zero , searchItem.getQueryRet());
> {noformat}
> Wait/notify semantics can be added. This is helpful for end user, and cleaner in the test case.
> {noformat}
> while (user1_item2.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
>   Thread.sleep(1);
> }
> {noformat}
> {noformat}
> synchronized (user1_item2.runnable) {
>   while (user1_item2.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
>      user1_item2.runnable.wait();
>   }
> }
> {noformat}
> The text box in the web interface should accept multiple queries separated by ';' like the cli does. This will add more usability. No need for separate set processor pages. 
> setQuery(String) is replaced by setQueries(List<String>)

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


[jira] Commented: (HIVE-716) Web Interface wait/notify, interface changes

Posted by "Namit Jain (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12758130#action_12758130 ] 

Namit Jain commented on HIVE-716:
---------------------------------

Yes, I agree - which is why TestHWISessionManager standalone is running fine.
Unfortunately, we need to clean up these tests I dont see any other workaround.

> Web Interface wait/notify, interface changes
> --------------------------------------------
>
>                 Key: HIVE-716
>                 URL: https://issues.apache.org/jira/browse/HIVE-716
>             Project: Hadoop Hive
>          Issue Type: Improvement
>          Components: Web UI
>         Environment: All
>            Reporter: Edward Capriolo
>            Assignee: Edward Capriolo
>         Attachments: hive-716-2.diff, hive-716-3.diff, hive-716-4.diff, hive-716-5.diff, hive-716.diff, hwi_query_box.png
>
>
> In TestHWISessionItem 
> Asserts are backwards
> {noformat}
> assertEquals(  searchItem.getQueryRet(), 0);
> {noformat}
> Should be
> {noformat}
> assertEquals( zero , searchItem.getQueryRet());
> {noformat}
> Wait/notify semantics can be added. This is helpful for end user, and cleaner in the test case.
> {noformat}
> while (user1_item2.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
>   Thread.sleep(1);
> }
> {noformat}
> {noformat}
> synchronized (user1_item2.runnable) {
>   while (user1_item2.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
>      user1_item2.runnable.wait();
>   }
> }
> {noformat}
> The text box in the web interface should accept multiple queries separated by ';' like the cli does. This will add more usability. No need for separate set processor pages. 
> setQuery(String) is replaced by setQueries(List<String>)

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


[jira] Commented: (HIVE-716) Web Interface wait/notify, interface changes

Posted by "Namit Jain (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12750193#action_12750193 ] 

Namit Jain commented on HIVE-716:
---------------------------------

@Edward, I committed 752 just now. Can you regenerate the patch - I would like to get it in before releasing 0.4

> Web Interface wait/notify, interface changes
> --------------------------------------------
>
>                 Key: HIVE-716
>                 URL: https://issues.apache.org/jira/browse/HIVE-716
>             Project: Hadoop Hive
>          Issue Type: Improvement
>          Components: Web UI
>         Environment: All
>            Reporter: Edward Capriolo
>            Assignee: Edward Capriolo
>         Attachments: hive-716-2.diff, hive-716-3.diff, hive-716-4.diff, hive-716.diff, hwi_query_box.png
>
>
> In TestHWISessionItem 
> Asserts are backwards
> {noformat}
> assertEquals(  searchItem.getQueryRet(), 0);
> {noformat}
> Should be
> {noformat}
> assertEquals( zero , searchItem.getQueryRet());
> {noformat}
> Wait/notify semantics can be added. This is helpful for end user, and cleaner in the test case.
> {noformat}
> while (user1_item2.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
>   Thread.sleep(1);
> }
> {noformat}
> {noformat}
> synchronized (user1_item2.runnable) {
>   while (user1_item2.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
>      user1_item2.runnable.wait();
>   }
> }
> {noformat}
> The text box in the web interface should accept multiple queries separated by ';' like the cli does. This will add more usability. No need for separate set processor pages. 
> setQuery(String) is replaced by setQueries(List<String>)

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


[jira] Commented: (HIVE-716) Web Interface wait/notify, interface changes

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

Edward Capriolo commented on HIVE-716:
--------------------------------------

You are being effected by this...
https://issues.apache.org/jira/browse/HIVE-752

I will try to commit a patch for it once i get familiar with the shims.

> Web Interface wait/notify, interface changes
> --------------------------------------------
>
>                 Key: HIVE-716
>                 URL: https://issues.apache.org/jira/browse/HIVE-716
>             Project: Hadoop Hive
>          Issue Type: Improvement
>          Components: Web UI
>         Environment: All
>            Reporter: Edward Capriolo
>            Assignee: Edward Capriolo
>         Attachments: hive-716-2.diff, hive-716-3.diff, hive-716-4.diff, hive-716.diff, hwi_query_box.png
>
>
> In TestHWISessionItem 
> Asserts are backwards
> {noformat}
> assertEquals(  searchItem.getQueryRet(), 0);
> {noformat}
> Should be
> {noformat}
> assertEquals( zero , searchItem.getQueryRet());
> {noformat}
> Wait/notify semantics can be added. This is helpful for end user, and cleaner in the test case.
> {noformat}
> while (user1_item2.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
>   Thread.sleep(1);
> }
> {noformat}
> {noformat}
> synchronized (user1_item2.runnable) {
>   while (user1_item2.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
>      user1_item2.runnable.wait();
>   }
> }
> {noformat}
> The text box in the web interface should accept multiple queries separated by ';' like the cli does. This will add more usability. No need for separate set processor pages. 
> setQuery(String) is replaced by setQueries(List<String>)

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


[jira] Commented: (HIVE-716) Web Interface wait/notify, interface changes

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

Vijay commented on HIVE-716:
----------------------------

I tried this on 0.4 and everything works perfectly. I really like the idea of the session result bucket .

> Web Interface wait/notify, interface changes
> --------------------------------------------
>
>                 Key: HIVE-716
>                 URL: https://issues.apache.org/jira/browse/HIVE-716
>             Project: Hadoop Hive
>          Issue Type: Improvement
>          Components: Web UI
>         Environment: All
>            Reporter: Edward Capriolo
>            Assignee: Edward Capriolo
>         Attachments: hive-716-2.diff, hive-716-3.diff, hive-716-4.diff, hive-716.diff, hwi_query_box.png
>
>
> In TestHWISessionItem 
> Asserts are backwards
> {noformat}
> assertEquals(  searchItem.getQueryRet(), 0);
> {noformat}
> Should be
> {noformat}
> assertEquals( zero , searchItem.getQueryRet());
> {noformat}
> Wait/notify semantics can be added. This is helpful for end user, and cleaner in the test case.
> {noformat}
> while (user1_item2.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
>   Thread.sleep(1);
> }
> {noformat}
> {noformat}
> synchronized (user1_item2.runnable) {
>   while (user1_item2.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
>      user1_item2.runnable.wait();
>   }
> }
> {noformat}
> The text box in the web interface should accept multiple queries separated by ';' like the cli does. This will add more usability. No need for separate set processor pages. 
> setQuery(String) is replaced by setQueries(List<String>)

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


[jira] Commented: (HIVE-716) Web Interface wait/notify, interface changes

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

Edward Capriolo commented on HIVE-716:
--------------------------------------

This patch should apply cleanly to both 0.4 and into trunk. I did build and tested against trunk.

> Web Interface wait/notify, interface changes
> --------------------------------------------
>
>                 Key: HIVE-716
>                 URL: https://issues.apache.org/jira/browse/HIVE-716
>             Project: Hadoop Hive
>          Issue Type: Improvement
>          Components: Web UI
>         Environment: All
>            Reporter: Edward Capriolo
>            Assignee: Edward Capriolo
>         Attachments: hive-716-2.diff, hive-716-3.diff, hive-716.diff, hwi_query_box.png
>
>
> In TestHWISessionItem 
> Asserts are backwards
> {noformat}
> assertEquals(  searchItem.getQueryRet(), 0);
> {noformat}
> Should be
> {noformat}
> assertEquals( zero , searchItem.getQueryRet());
> {noformat}
> Wait/notify semantics can be added. This is helpful for end user, and cleaner in the test case.
> {noformat}
> while (user1_item2.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
>   Thread.sleep(1);
> }
> {noformat}
> {noformat}
> synchronized (user1_item2.runnable) {
>   while (user1_item2.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
>      user1_item2.runnable.wait();
>   }
> }
> {noformat}
> The text box in the web interface should accept multiple queries separated by ';' like the cli does. This will add more usability. No need for separate set processor pages. 
> setQuery(String) is replaced by setQueries(List<String>)

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


[jira] Commented: (HIVE-716) Web Interface wait/notify, interface changes

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

Edward Capriolo commented on HIVE-716:
--------------------------------------

{noformat}
  [junit] Hive history file=/home/ecapriolo/hive-18.3-dont-touch/hive-trunk/hwi/../build/ql/tmp/hive_job_log_ecapriolo_200909220835_200968210.txt
    [junit] Hive history file=/home/ecapriolo/hive-18.3-dont-touch/hive-trunk/hwi/../build/ql/tmp/hive_job_log_ecapriolo_200909220835_1376971143.txt
    [junit] Hive history file=/home/ecapriolo/hive-18.3-dont-touch/hive-trunk/hwi/../build/ql/tmp/hive_job_log_ecapriolo_200909220835_989905403.txt
    [junit] Pre Exec Hook Class not found:org.apache.hadoop.hive.ql.hooks.PreExecutePrinter
    [junit] FAILED: Unknown exception : org.apache.hadoop.hive.ql.hooks.PreExecutePrinter
    [junit] Pre Exec Hook Class not found:org.apache.hadoop.hive.ql.hooks.PreExecutePrinter
    [junit] FAILED: Unknown exception : org.apache.hadoop.hive.ql.hooks.PreExecutePrinter
    [junit] Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 1.163 sec
    [junit] Test org.apache.hadoop.hive.hwi.TestHWISessionManager FAILED
{noformat}
{noformat}
[ecapriolo@laptop1 hwi]$ svn update
At revision 817701.
{noformat}

I have a slightly different classpath and testclasspath to account for the jetty jars in hadoop-core/lib 

Any ideas about this?

> Web Interface wait/notify, interface changes
> --------------------------------------------
>
>                 Key: HIVE-716
>                 URL: https://issues.apache.org/jira/browse/HIVE-716
>             Project: Hadoop Hive
>          Issue Type: Improvement
>          Components: Web UI
>         Environment: All
>            Reporter: Edward Capriolo
>            Assignee: Edward Capriolo
>         Attachments: hive-716-2.diff, hive-716-3.diff, hive-716-4.diff, hive-716-5.diff, hive-716.diff, hwi_query_box.png
>
>
> In TestHWISessionItem 
> Asserts are backwards
> {noformat}
> assertEquals(  searchItem.getQueryRet(), 0);
> {noformat}
> Should be
> {noformat}
> assertEquals( zero , searchItem.getQueryRet());
> {noformat}
> Wait/notify semantics can be added. This is helpful for end user, and cleaner in the test case.
> {noformat}
> while (user1_item2.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
>   Thread.sleep(1);
> }
> {noformat}
> {noformat}
> synchronized (user1_item2.runnable) {
>   while (user1_item2.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
>      user1_item2.runnable.wait();
>   }
> }
> {noformat}
> The text box in the web interface should accept multiple queries separated by ';' like the cli does. This will add more usability. No need for separate set processor pages. 
> setQuery(String) is replaced by setQueries(List<String>)

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


[jira] Commented: (HIVE-716) Web Interface wait/notify, interface changes

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

Edward Capriolo commented on HIVE-716:
--------------------------------------

Do you want me to break some components out into separate Jira's? This could make the review process easier for you.

> Web Interface wait/notify, interface changes
> --------------------------------------------
>
>                 Key: HIVE-716
>                 URL: https://issues.apache.org/jira/browse/HIVE-716
>             Project: Hadoop Hive
>          Issue Type: Improvement
>          Components: Web UI
>         Environment: All
>            Reporter: Edward Capriolo
>            Assignee: Edward Capriolo
>         Attachments: hive-716-2.diff, hive-716-3.diff, hive-716.diff, hwi_query_box.png
>
>
> In TestHWISessionItem 
> Asserts are backwards
> {noformat}
> assertEquals(  searchItem.getQueryRet(), 0);
> {noformat}
> Should be
> {noformat}
> assertEquals( zero , searchItem.getQueryRet());
> {noformat}
> Wait/notify semantics can be added. This is helpful for end user, and cleaner in the test case.
> {noformat}
> while (user1_item2.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
>   Thread.sleep(1);
> }
> {noformat}
> {noformat}
> synchronized (user1_item2.runnable) {
>   while (user1_item2.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
>      user1_item2.runnable.wait();
>   }
> }
> {noformat}
> The text box in the web interface should accept multiple queries separated by ';' like the cli does. This will add more usability. No need for separate set processor pages. 
> setQuery(String) is replaced by setQueries(List<String>)

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


[jira] Updated: (HIVE-716) Web Interface wait/notify, interface changes

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

Edward Capriolo updated HIVE-716:
---------------------------------

    Attachment: hwi_query_box.png
                hive-716-3.diff

Working version. The main user facing feature is that the query box accepts multiple queries and a 'result bucket' holds the last X rows in the session.

> Web Interface wait/notify, interface changes
> --------------------------------------------
>
>                 Key: HIVE-716
>                 URL: https://issues.apache.org/jira/browse/HIVE-716
>             Project: Hadoop Hive
>          Issue Type: Improvement
>          Components: Web UI
>         Environment: All
>            Reporter: Edward Capriolo
>            Assignee: Edward Capriolo
>         Attachments: hive-716-2.diff, hive-716-3.diff, hive-716.diff, hwi_query_box.png
>
>
> In TestHWISessionItem 
> Asserts are backwards
> {noformat}
> assertEquals(  searchItem.getQueryRet(), 0);
> {noformat}
> Should be
> {noformat}
> assertEquals( zero , searchItem.getQueryRet());
> {noformat}
> Wait/notify semantics can be added. This is helpful for end user, and cleaner in the test case.
> {noformat}
> while (user1_item2.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
>   Thread.sleep(1);
> }
> {noformat}
> {noformat}
> synchronized (user1_item2.runnable) {
>   while (user1_item2.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
>      user1_item2.runnable.wait();
>   }
> }
> {noformat}
> The text box in the web interface should accept multiple queries separated by ';' like the cli does. This will add more usability. No need for separate set processor pages. 
> setQuery(String) is replaced by setQueries(List<String>)

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


[jira] Commented: (HIVE-716) Web Interface wait/notify, interface changes

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

Vijay commented on HIVE-716:
----------------------------

It'd be great to have this committed soon in whatever process that makes sense. This absolutely ups the usability.

One related problem I keep running into has to do with the ShimLoader.java class (./shims/src/common/java/org/apache/hadoop/hive/shims/ShimLoader.java). As the sources are right now, when I run hwi, the shim loader cannot find the jetty shim class since it's looking for org.apache.jetty.hive.shims.Jetty18Shims class (I'm using hadoop 0.18.3). It seems like these classes have recently been moved to the package org.apache.jetty.hive.shims. I simply change org.apache.jetty to org.apache.hadoop and it works but this does seem like either a bug or incomplete code refactor/cleanup task.

> Web Interface wait/notify, interface changes
> --------------------------------------------
>
>                 Key: HIVE-716
>                 URL: https://issues.apache.org/jira/browse/HIVE-716
>             Project: Hadoop Hive
>          Issue Type: Improvement
>          Components: Web UI
>         Environment: All
>            Reporter: Edward Capriolo
>            Assignee: Edward Capriolo
>         Attachments: hive-716-2.diff, hive-716-3.diff, hive-716-4.diff, hive-716.diff, hwi_query_box.png
>
>
> In TestHWISessionItem 
> Asserts are backwards
> {noformat}
> assertEquals(  searchItem.getQueryRet(), 0);
> {noformat}
> Should be
> {noformat}
> assertEquals( zero , searchItem.getQueryRet());
> {noformat}
> Wait/notify semantics can be added. This is helpful for end user, and cleaner in the test case.
> {noformat}
> while (user1_item2.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
>   Thread.sleep(1);
> }
> {noformat}
> {noformat}
> synchronized (user1_item2.runnable) {
>   while (user1_item2.getStatus() != HWISessionItem.WebSessionItemStatus.QUERY_COMPLETE) {
>      user1_item2.runnable.wait();
>   }
> }
> {noformat}
> The text box in the web interface should accept multiple queries separated by ';' like the cli does. This will add more usability. No need for separate set processor pages. 
> setQuery(String) is replaced by setQueries(List<String>)

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