[jira] [Commented] (CASSANDRA-7676) bin/cassandra should complain if $JAVA is empty or not an executable

2014-10-09 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-7676?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14165077#comment-14165077
 ] 

Jonathan Ellis commented on CASSANDRA-7676:
---

committed

 bin/cassandra should complain if $JAVA is empty or not an executable
 

 Key: CASSANDRA-7676
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7676
 Project: Cassandra
  Issue Type: Improvement
Reporter: Robert Stupp
Assignee: Robert Stupp
Priority: Trivial
  Labels: qa-resolved
 Fix For: 2.0.11, 2.1.1

 Attachments: 7676v2.txt, java_not_found-fix.txt


 If JAVA_HOME points to a non-existing directory, bin/cassandra just complains 
 with {{[node1 ERROR] /Users/snazy/.ccm/test/node1/bin/cassandra: line 151: 
 exec: : not found}} (via ccm).
 Patch checks if {{$JAVA}} is empty or does not point to an executable and 
 prints appropriate error message.
 (Patch against trunk)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-7676) bin/cassandra should complain if $JAVA is empty or not an executable

2014-10-05 Thread Michael Shuler (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-7676?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14159808#comment-14159808
 ] 

Michael Shuler commented on CASSANDRA-7676:
---

Looks good to me :)

 bin/cassandra should complain if $JAVA is empty or not an executable
 

 Key: CASSANDRA-7676
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7676
 Project: Cassandra
  Issue Type: Improvement
Reporter: Robert Stupp
Assignee: Robert Stupp
Priority: Trivial
  Labels: qa-resolved
 Fix For: 2.0.11, 2.1.1

 Attachments: 7676v2.txt, java_not_found-fix.txt


 If JAVA_HOME points to a non-existing directory, bin/cassandra just complains 
 with {{[node1 ERROR] /Users/snazy/.ccm/test/node1/bin/cassandra: line 151: 
 exec: : not found}} (via ccm).
 Patch checks if {{$JAVA}} is empty or does not point to an executable and 
 prints appropriate error message.
 (Patch against trunk)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-7676) bin/cassandra should complain if $JAVA is empty or not an executable

2014-08-09 Thread Robert Stupp (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-7676?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14091712#comment-14091712
 ] 

Robert Stupp commented on CASSANDRA-7676:
-

Hm - not sure (not a shell experrt) but {{-z}} tests, if the arg is empty and 
{{-x}} check if it's executable. But the first one should be sufficient.

 bin/cassandra should complain if $JAVA is empty or not an executable
 

 Key: CASSANDRA-7676
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7676
 Project: Cassandra
  Issue Type: Improvement
Reporter: Robert Stupp
Assignee: Robert Stupp
Priority: Trivial
 Attachments: java_not_found-fix.txt


 If JAVA_HOME points to a non-existing directory, bin/cassandra just complains 
 with {{[node1 ERROR] /Users/snazy/.ccm/test/node1/bin/cassandra: line 151: 
 exec: : not found}} (via ccm).
 Patch checks if {{$JAVA}} is empty or does not point to an executable and 
 prints appropriate error message.
 (Patch against trunk)



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-7676) bin/cassandra should complain if $JAVA is empty or not an executable

2014-08-08 Thread Michael Shuler (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-7676?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14090965#comment-14090965
 ] 

Michael Shuler commented on CASSANDRA-7676:
---

Works for me, but is the second check reachable?

{noformat}
(cassandra-2.0 *)mshuler@hana:~/git/cassandra$ export JAVA_HOME=/dev/null
(cassandra-2.0 *)mshuler@hana:~/git/cassandra$ cassandra
Unable to find java executable. Check JAVA_HOME and PATH environment variables.
{noformat}

I tried to reach the second conditional, but only hit the first, then the 
version check
{noformat}
(cassandra-2.0 *)mshuler@hana:~/git/cassandra$ mkdir -p /tmp/myjdk/bin
(cassandra-2.0 *)mshuler@hana:~/git/cassandra$ touch /tmp/myjdk/bin/java
(cassandra-2.0 *)mshuler@hana:~/git/cassandra$ export JAVA_HOME=/tmp/myjdk
(cassandra-2.0 *)mshuler@hana:~/git/cassandra$ cassandra
Unable to find java executable. Check JAVA_HOME and PATH environment variables.
(cassandra-2.0 *)mshuler@hana:~/git/cassandra$ chmod 755 /tmp/myjdk/bin/java 
(cassandra-2.0 *)mshuler@hana:~/git/cassandra$ cassandra
Cassandra 2.0 and later require Java 7 or later.
{noformat}

 bin/cassandra should complain if $JAVA is empty or not an executable
 

 Key: CASSANDRA-7676
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7676
 Project: Cassandra
  Issue Type: Improvement
Reporter: Robert Stupp
Assignee: Robert Stupp
Priority: Trivial
 Attachments: java_not_found-fix.txt


 If JAVA_HOME points to a non-existing directory, bin/cassandra just complains 
 with {{[node1 ERROR] /Users/snazy/.ccm/test/node1/bin/cassandra: line 151: 
 exec: : not found}} (via ccm).
 Patch checks if {{$JAVA}} is empty or does not point to an executable and 
 prints appropriate error message.
 (Patch against trunk)



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-7676) bin/cassandra should complain if $JAVA is empty or not an executable

2014-08-08 Thread Michael Shuler (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-7676?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14091156#comment-14091156
 ] 

Michael Shuler commented on CASSANDRA-7676:
---

Since I poked at a dtest with this build of C*, I don't think this does 
actually work out correctly
{noformat}
(master)mshuler@hana:~/git/cassandra-dtest$ export MAX_HEAP_SIZE=1G; export 
HEAP_NEWSIZE=256M; NUM_TOKENS=32 PRINT_DEBUG=true nosetests --nocapture 
--nologcapture --verbosity=3 secondary_indexes_test.py
nose.config: INFO: Ignoring files matching ['^\\.', '^_', '^setup\\.py$']
bug3367_test (secondary_indexes_test.TestSecondaryIndexes) ... cluster ccm 
directory: /tmp/dtest-ajkROw
[node1 ERROR] java is not a valid java executable. Check JAVA_HOME and PATH 
environment variables.
ERROR
Error saving log: [Errno 2] No such file or directory: 
'/tmp/dtest-ajkROw/test/node1/logs/system.log'
removing ccm cluster test at: /tmp/dtest-ajkROw
ERROR
test_6924_dropping_cf (secondary_indexes_test.TestSecondaryIndexes) ... cluster 
ccm directory: /tmp/dtest-mG0pm8
SKIP: 2.0.10  2.1
removing ccm cluster test at: /tmp/dtest-mG0pm8
test_6924_dropping_ks (secondary_indexes_test.TestSecondaryIndexes) ... cluster 
ccm directory: /tmp/dtest-dIh4so
SKIP: 2.0.10  2.1
removing ccm cluster test at: /tmp/dtest-dIh4so
test_low_cardinality_indexes (secondary_indexes_test.TestSecondaryIndexes) ... 
cluster ccm directory: /tmp/dtest-7_IBiy
SKIP: 2.0.10  2.1
removing ccm cluster test at: /tmp/dtest-7_IBiy
test_list_indexes (secondary_indexes_test.TestSecondaryIndexesOnCollections) 
... cluster ccm directory: /tmp/dtest-gyv2xS
SKIP: 2.0.10  2.1
removing ccm cluster test at: /tmp/dtest-gyv2xS
test_map_indexes (secondary_indexes_test.TestSecondaryIndexesOnCollections) ... 
cluster ccm directory: /tmp/dtest-P_7pxL
[node1 ERROR] java is not a valid java executable. Check JAVA_HOME and PATH 
environment variables.
ERROR
Error saving log: [Errno 2] No such file or directory: 
'/tmp/dtest-P_7pxL/test/node1/logs/system.log'
removing ccm cluster test at: /tmp/dtest-P_7pxL
ERROR
test_set_indexes (secondary_indexes_test.TestSecondaryIndexesOnCollections) ... 
cluster ccm directory: /tmp/dtest-GJJbSB
[node1 ERROR] java is not a valid java executable. Check JAVA_HOME and PATH 
environment variables.
ERROR
Error saving log: [Errno 2] No such file or directory: 
'/tmp/dtest-GJJbSB/test/node1/logs/system.log'
removing ccm cluster test at: /tmp/dtest-GJJbSB
ERROR

==
ERROR: bug3367_test (secondary_indexes_test.TestSecondaryIndexes)
--
Traceback (most recent call last):
  File /home/mshuler/git/cassandra-dtest/secondary_indexes_test.py, line 17, 
in bug3367_test
cursor = self.patient_cql_connection(node1).cursor()
  File /home/mshuler/git/cassandra-dtest/dtest.py, line 280, in 
patient_cql_connection
bypassed_exception=TSocket.TTransportException
  File /home/mshuler/git/cassandra-dtest/dtest.py, line 72, in 
retry_till_success
return fun(*args, **kwargs)
  File /home/mshuler/git/cassandra-dtest/dtest.py, line 257, in cql_connection
con = cql.connect(host, port, keyspace=keyspace, cql_version=version, 
user=user, password=password)
  File /home/mshuler/git/cassandra-dbapi2/cql/connection.py, line 143, in 
connect
consistency_level=consistency_level, transport=transport)
  File /home/mshuler/git/cassandra-dbapi2/cql/connection.py, line 59, in 
__init__
self.establish_connection()
  File /home/mshuler/git/cassandra-dbapi2/cql/thrifteries.py, line 163, in 
establish_connection
self.transport.open()
  File /usr/lib/python2.7/dist-packages/thrift/transport/TTransport.py, line 
261, in open
return self.__trans.open()
  File /usr/lib/python2.7/dist-packages/thrift/transport/TSocket.py, line 99, 
in open
message=message)
TTransportException: Could not connect to 127.0.0.1:9160

==
ERROR: bug3367_test (secondary_indexes_test.TestSecondaryIndexes)
--
Traceback (most recent call last):
  File /home/mshuler/git/cassandra-dtest/dtest.py, line 212, in tearDown
errors = list(self.__filter_errors([ msg for msg, i in 
node.grep_log(ERROR)]))
  File /home/mshuler/git/ccm/ccmlib/node.py, line 238, in grep_log
with open(self.logfilename()) as f:
IOError: [Errno 2] No such file or directory: 
'/tmp/dtest-ajkROw/test/node1/logs/system.log'

==
ERROR: test_map_indexes 
(secondary_indexes_test.TestSecondaryIndexesOnCollections)
--
Traceback (most recent call last):
  File /home/mshuler/git/cassandra-dtest/secondary_indexes_test.py, line 404, 
in test_map_indexes
 

[jira] [Commented] (CASSANDRA-7676) bin/cassandra should complain if $JAVA is empty or not an executable

2014-08-08 Thread Michael Shuler (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-7676?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14091169#comment-14091169
 ] 

Michael Shuler commented on CASSANDRA-7676:
---

Same test.  If I remove the second conditional that's in the patch, the 
/usr/bin/java in my path works fine.
{noformat}
(master)mshuler@hana:~/git/cassandra-dtest$ export MAX_HEAP_SIZE=1G; export 
HEAP_NEWSIZE=256M; NUM_TOKENS=32 PRINT_DEBUG=true nosetests --nocapture 
--nologcapture --verbosity=3 secondary_indexes_test.py
nose.config: INFO: Ignoring files matching ['^\\.', '^_', '^setup\\.py$']
bug3367_test (secondary_indexes_test.TestSecondaryIndexes) ... cluster ccm 
directory: /tmp/dtest-sbxbUa
[node1 ERROR] 
[node1 ERROR] 
removing ccm cluster test at: /tmp/dtest-sbxbUa
ok
test_6924_dropping_cf (secondary_indexes_test.TestSecondaryIndexes) ... cluster 
ccm directory: /tmp/dtest-M1CSME
SKIP: 2.0.10  2.1
removing ccm cluster test at: /tmp/dtest-M1CSME
test_6924_dropping_ks (secondary_indexes_test.TestSecondaryIndexes) ... cluster 
ccm directory: /tmp/dtest-zIE2rd
SKIP: 2.0.10  2.1
removing ccm cluster test at: /tmp/dtest-zIE2rd
test_low_cardinality_indexes (secondary_indexes_test.TestSecondaryIndexes) ... 
cluster ccm directory: /tmp/dtest-ArqKeS
SKIP: 2.0.10  2.1
removing ccm cluster test at: /tmp/dtest-ArqKeS
test_list_indexes (secondary_indexes_test.TestSecondaryIndexesOnCollections) 
... cluster ccm directory: /tmp/dtest-XgQ9BJ
SKIP: 2.0.10  2.1
removing ccm cluster test at: /tmp/dtest-XgQ9BJ
test_map_indexes (secondary_indexes_test.TestSecondaryIndexesOnCollections) ... 
cluster ccm directory: /tmp/dtest-Btc1tR
[node1 ERROR] 
[node1 ERROR] 
FAIL
removing ccm cluster test at: /tmp/dtest-Btc1tR
test_set_indexes (secondary_indexes_test.TestSecondaryIndexesOnCollections) ... 
cluster ccm directory: /tmp/dtest-WIAye7
[node1 ERROR] 
[node1 ERROR] 
FAIL
removing ccm cluster test at: /tmp/dtest-WIAye7

==
FAIL: test_map_indexes 
(secondary_indexes_test.TestSecondaryIndexesOnCollections)
--
Traceback (most recent call last):
  File /home/mshuler/git/cassandra-dtest/secondary_indexes_test.py, line 416, 
in test_map_indexes
cursor.execute(stmt)
AssertionError: No indexed columns present in by-columns clause does not 
match Bad Request: line 1:49 no viable alternative at input 'contains'

==
FAIL: test_set_indexes 
(secondary_indexes_test.TestSecondaryIndexesOnCollections)
--
Traceback (most recent call last):
  File /home/mshuler/git/cassandra-dtest/secondary_indexes_test.py, line 324, 
in test_set_indexes
cursor.execute(stmt)
AssertionError: No indexed columns present in by-columns clause does not 
match Bad Request: line 1:49 no viable alternative at input 'contains'

--
Ran 7 tests in 13.972s

FAILED (SKIP=4, failures=2)
{noformat}

 bin/cassandra should complain if $JAVA is empty or not an executable
 

 Key: CASSANDRA-7676
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7676
 Project: Cassandra
  Issue Type: Improvement
Reporter: Robert Stupp
Assignee: Robert Stupp
Priority: Trivial
 Attachments: java_not_found-fix.txt


 If JAVA_HOME points to a non-existing directory, bin/cassandra just complains 
 with {{[node1 ERROR] /Users/snazy/.ccm/test/node1/bin/cassandra: line 151: 
 exec: : not found}} (via ccm).
 Patch checks if {{$JAVA}} is empty or does not point to an executable and 
 prints appropriate error message.
 (Patch against trunk)



--
This message was sent by Atlassian JIRA
(v6.2#6252)