[jira] [Resolved] (KAFKA-1889) Refactor shell wrapper scripts

2019-06-19 Thread Francois Saint-Jacques (JIRA)


 [ 
https://issues.apache.org/jira/browse/KAFKA-1889?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Francois Saint-Jacques resolved KAFKA-1889.
---
Resolution: Won't Fix

> Refactor shell wrapper scripts
> --
>
> Key: KAFKA-1889
> URL: https://issues.apache.org/jira/browse/KAFKA-1889
> Project: Kafka
>  Issue Type: Improvement
>  Components: packaging
>Reporter: Francois Saint-Jacques
>Assignee: Francois Saint-Jacques
>Priority: Minor
> Attachments: refactor-scripts-v1.patch, refactor-scripts-v2.patch
>
>
> Shell scripts in bin/ need love.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KAFKA-1367) Broker topic metadata not kept in sync with ZooKeeper

2015-02-06 Thread Francois Saint-Jacques (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-1367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14309966#comment-14309966
 ] 

Francois Saint-Jacques commented on KAFKA-1367:
---

Instead of silently removing the field, could the controller force a cache 
refresh on a metadata request?

 Broker topic metadata not kept in sync with ZooKeeper
 -

 Key: KAFKA-1367
 URL: https://issues.apache.org/jira/browse/KAFKA-1367
 Project: Kafka
  Issue Type: Bug
Affects Versions: 0.8.0, 0.8.1
Reporter: Ryan Berdeen
  Labels: newbie++
 Fix For: 0.8.3

 Attachments: KAFKA-1367.txt


 When a broker is restarted, the topic metadata responses from the brokers 
 will be incorrect (different from ZooKeeper) until a preferred replica leader 
 election.
 In the metadata, it looks like leaders are correctly removed from the ISR 
 when a broker disappears, but followers are not. Then, when a broker 
 reappears, the ISR is never updated.
 I used a variation of the Vagrant setup created by Joe Stein to reproduce 
 this with latest from the 0.8.1 branch: 
 https://github.com/also/kafka/commit/dba36a503a5e22ea039df0f9852560b4fb1e067c



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


[jira] [Commented] (KAFKA-1889) Refactor shell wrapper scripts

2015-01-26 Thread Francois Saint-Jacques (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-1889?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14291967#comment-14291967
 ] 

Francois Saint-Jacques commented on KAFKA-1889:
---

Do you think it could make it to 0.8.2?

 Refactor shell wrapper scripts
 --

 Key: KAFKA-1889
 URL: https://issues.apache.org/jira/browse/KAFKA-1889
 Project: Kafka
  Issue Type: Improvement
  Components: packaging
Reporter: Francois Saint-Jacques
Assignee: Francois Saint-Jacques
Priority: Minor
 Attachments: refactor-scripts-v1.patch, refactor-scripts-v2.patch


 Shell scripts in bin/ need love.



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


[jira] [Updated] (KAFKA-1889) Refactor shell wrapper scripts

2015-01-22 Thread Francois Saint-Jacques (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-1889?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Francois Saint-Jacques updated KAFKA-1889:
--
Status: Open  (was: Patch Available)

 Refactor shell wrapper scripts
 --

 Key: KAFKA-1889
 URL: https://issues.apache.org/jira/browse/KAFKA-1889
 Project: Kafka
  Issue Type: Improvement
  Components: packaging
Reporter: Francois Saint-Jacques
Assignee: Francois Saint-Jacques
Priority: Minor
 Attachments: refactor-scripts-v1.patch, refactor-scripts-v2.patch


 Shell scripts in bin/ need love.



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


[jira] [Commented] (KAFKA-1889) Refactor shell wrapper scripts

2015-01-22 Thread Francois Saint-Jacques (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-1889?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14288120#comment-14288120
 ] 

Francois Saint-Jacques commented on KAFKA-1889:
---

My goal is to fix the kafka startup script to make it friendlier to package as 
rpm or deb. I believe it is a disjoint concern than the issue you mentioned.

 Refactor shell wrapper scripts
 --

 Key: KAFKA-1889
 URL: https://issues.apache.org/jira/browse/KAFKA-1889
 Project: Kafka
  Issue Type: Improvement
  Components: packaging
Reporter: Francois Saint-Jacques
Assignee: Francois Saint-Jacques
Priority: Minor
 Attachments: refactor-scripts-v1.patch, refactor-scripts-v2.patch


 Shell scripts in bin/ need love.



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


[jira] [Commented] (KAFKA-1889) Refactor shell wrapper scripts

2015-01-22 Thread Francois Saint-Jacques (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-1889?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14288193#comment-14288193
 ] 

Francois Saint-Jacques commented on KAFKA-1889:
---

It's not about working well with rpm and debian, it's about having sane default 
and behaviour so that packagers won't have to diff/patch said scripts.

My patch is not final at all, I just wanted to start the discussion on cleaning 
the scripts.

 Refactor shell wrapper scripts
 --

 Key: KAFKA-1889
 URL: https://issues.apache.org/jira/browse/KAFKA-1889
 Project: Kafka
  Issue Type: Improvement
  Components: packaging
Reporter: Francois Saint-Jacques
Assignee: Francois Saint-Jacques
Priority: Minor
 Attachments: refactor-scripts-v1.patch, refactor-scripts-v2.patch


 Shell scripts in bin/ need love.



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


[jira] [Commented] (KAFKA-1889) Refactor shell wrapper scripts

2015-01-22 Thread Francois Saint-Jacques (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-1889?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14288205#comment-14288205
 ] 

Francois Saint-Jacques commented on KAFKA-1889:
---

Also note that this patch keeps the existing behaviour (to some epsilon: var 
rename + default jmx port which will break multiple process). It is mostly a 
cleanup of kafka-run-class.sh that acquired technical debts over time.

 Refactor shell wrapper scripts
 --

 Key: KAFKA-1889
 URL: https://issues.apache.org/jira/browse/KAFKA-1889
 Project: Kafka
  Issue Type: Improvement
  Components: packaging
Reporter: Francois Saint-Jacques
Assignee: Francois Saint-Jacques
Priority: Minor
 Attachments: refactor-scripts-v1.patch, refactor-scripts-v2.patch


 Shell scripts in bin/ need love.



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


[jira] [Updated] (KAFKA-1889) Refactor shell wrapper scripts

2015-01-21 Thread Francois Saint-Jacques (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-1889?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Francois Saint-Jacques updated KAFKA-1889:
--
Attachment: refactor-scripts-v1.patch

 Refactor shell wrapper scripts
 --

 Key: KAFKA-1889
 URL: https://issues.apache.org/jira/browse/KAFKA-1889
 Project: Kafka
  Issue Type: Improvement
  Components: packaging
Reporter: Francois Saint-Jacques
Assignee: Francois Saint-Jacques
Priority: Minor
 Attachments: refactor-scripts-v1.patch


 Shell scripts in bin/ need love.



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


[jira] [Comment Edited] (KAFKA-1889) Refactor shell wrapper scripts

2015-01-21 Thread Francois Saint-Jacques (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-1889?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14286097#comment-14286097
 ] 

Francois Saint-Jacques edited comment on KAFKA-1889 at 1/21/15 7:18 PM:


The second patch should give an overview of what a 'clean' kafka-run-class.sh 
should look like. This will allow packagers to provide easily configurable 
defaults via /etc/default/kafka (on debian-based system) or 
/etc/sysconfig/kafka (on RHEL-based system).


was (Author: fsaintjacques):
The second patch should give an overview of what a 'clean' kafka-run-class.sh 
should look like.

 Refactor shell wrapper scripts
 --

 Key: KAFKA-1889
 URL: https://issues.apache.org/jira/browse/KAFKA-1889
 Project: Kafka
  Issue Type: Improvement
  Components: packaging
Reporter: Francois Saint-Jacques
Assignee: Francois Saint-Jacques
Priority: Minor
 Attachments: refactor-scripts-v1.patch, refactor-scripts-v2.patch


 Shell scripts in bin/ need love.



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


[jira] [Created] (KAFKA-1889) Refactor shell wrapper scripts

2015-01-21 Thread Francois Saint-Jacques (JIRA)
Francois Saint-Jacques created KAFKA-1889:
-

 Summary: Refactor shell wrapper scripts
 Key: KAFKA-1889
 URL: https://issues.apache.org/jira/browse/KAFKA-1889
 Project: Kafka
  Issue Type: Improvement
  Components: packaging
Reporter: Francois Saint-Jacques
Priority: Minor


Shell scripts in bin/ need love.



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


[jira] [Commented] (KAFKA-1889) Refactor shell wrapper scripts

2015-01-21 Thread Francois Saint-Jacques (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-1889?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14286006#comment-14286006
 ] 

Francois Saint-Jacques commented on KAFKA-1889:
---

I have multiple other comments on the scripts that I didn't address and might 
be worth talking.

1. There seems to be many way to pass option to kafka-run-class.sh, either by 
arguments (-daemon|-loggc|...) or by environment variables 
(KAFKA_JMX_OPTS|KAFKA_OPTS|KAFKA_HEAP_OPTS|...). This is inconsistent and needs 
to be addressed.
2. Scripts shouldn't bother daemonizing, leave this to packagers, just make 
sure you exec correctly.
3. The defaults are not production ready for servers:
 -gc log shouldn't be enabled by default
 -kafka-request.log to TRACE, this is a silent disk killer on busy cluster
 - never do this in non-init script, should be left to packagers: if [ ! -d 
${LOG_DIR} ]; then mkdir -p ${LOG_DIR}; fi

 Refactor shell wrapper scripts
 --

 Key: KAFKA-1889
 URL: https://issues.apache.org/jira/browse/KAFKA-1889
 Project: Kafka
  Issue Type: Improvement
  Components: packaging
Reporter: Francois Saint-Jacques
Assignee: Francois Saint-Jacques
Priority: Minor
 Attachments: refactor-scripts-v1.patch


 Shell scripts in bin/ need love.



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


[jira] [Updated] (KAFKA-1889) Refactor shell wrapper scripts

2015-01-21 Thread Francois Saint-Jacques (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-1889?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Francois Saint-Jacques updated KAFKA-1889:
--
Assignee: Francois Saint-Jacques
  Status: Patch Available  (was: Open)

 Refactor shell wrapper scripts
 --

 Key: KAFKA-1889
 URL: https://issues.apache.org/jira/browse/KAFKA-1889
 Project: Kafka
  Issue Type: Improvement
  Components: packaging
Reporter: Francois Saint-Jacques
Assignee: Francois Saint-Jacques
Priority: Minor

 Shell scripts in bin/ need love.



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


[jira] [Commented] (KAFKA-1889) Refactor shell wrapper scripts

2015-01-21 Thread Francois Saint-Jacques (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-1889?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14286097#comment-14286097
 ] 

Francois Saint-Jacques commented on KAFKA-1889:
---

The second patch should give an overview of what a 'clean' kafka-run-class.sh 
should look like.

 Refactor shell wrapper scripts
 --

 Key: KAFKA-1889
 URL: https://issues.apache.org/jira/browse/KAFKA-1889
 Project: Kafka
  Issue Type: Improvement
  Components: packaging
Reporter: Francois Saint-Jacques
Assignee: Francois Saint-Jacques
Priority: Minor
 Attachments: refactor-scripts-v1.patch, refactor-scripts-v2.patch


 Shell scripts in bin/ need love.



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


[jira] [Updated] (KAFKA-1889) Refactor shell wrapper scripts

2015-01-21 Thread Francois Saint-Jacques (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-1889?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Francois Saint-Jacques updated KAFKA-1889:
--
Attachment: refactor-scripts-v2.patch

 Refactor shell wrapper scripts
 --

 Key: KAFKA-1889
 URL: https://issues.apache.org/jira/browse/KAFKA-1889
 Project: Kafka
  Issue Type: Improvement
  Components: packaging
Reporter: Francois Saint-Jacques
Assignee: Francois Saint-Jacques
Priority: Minor
 Attachments: refactor-scripts-v1.patch, refactor-scripts-v2.patch


 Shell scripts in bin/ need love.



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


[jira] [Commented] (KAFKA-1115) producer performance affected by trace/debug calls

2013-11-03 Thread Francois Saint-Jacques (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-1115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13812550#comment-13812550
 ] 

Francois Saint-Jacques commented on KAFKA-1115:
---

You are right, and by looking at the code the trace/debug logging functions are 
defined with lazy arguments.

By debugging a bit further, I did not have any log4.properties in the producer 
classpath. The library does give me a WARN about missing log4.properties file. 
After this warning message, the program does not output any more log. 
Internally I'd assume the logging still we're set to TRACE without any appender 
to stdout/stderr.

I'll take WARN more seriously next time. Maybe a put message in the producer 
documentation that not providing log4j configuration will have a serious impact 
on performance.

On another note, I believe trace/debug message shouldn't be committed to 
production code, but this is only a personal hunch.

 producer performance affected by trace/debug calls
 --

 Key: KAFKA-1115
 URL: https://issues.apache.org/jira/browse/KAFKA-1115
 Project: Kafka
  Issue Type: Improvement
  Components: producer 
Affects Versions: 0.8
Reporter: Francois Saint-Jacques
Assignee: Francois Saint-Jacques
 Attachments: producer-performance-fix.patch


 After investigating high CPU usage on some producers in production, we found 
 out that a lot of time was passed in string construction for logging of DEBUG 
 and TRACE level.
 This patch removes most of the logging calls, on our systems it cuts CPU 
 usage down to half of what it used to be.
 Note that this is a significant boost in performance for environment where 
 there are thousands of msg/s.



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Created] (KAFKA-1115) producer performance affected by trace/debug calls

2013-11-01 Thread Francois Saint-Jacques (JIRA)
Francois Saint-Jacques created KAFKA-1115:
-

 Summary: producer performance affected by trace/debug calls
 Key: KAFKA-1115
 URL: https://issues.apache.org/jira/browse/KAFKA-1115
 Project: Kafka
  Issue Type: Improvement
  Components: producer 
Affects Versions: 0.8
Reporter: Francois Saint-Jacques
Assignee: Francois Saint-Jacques


After investigating high CPU usage on some producers in production, we found 
out that a lot of time was passed in string construction for logging of DEBUG 
and TRACE level.

This patch removes most of the logging calls, on our systems it cuts CPU usage 
down to half of what it used to be.

Note that this is a significant boost in performance for environment where 
there are thousands of msg/s.



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Updated] (KAFKA-1115) producer performance affected by trace/debug calls

2013-11-01 Thread Francois Saint-Jacques (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-1115?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Francois Saint-Jacques updated KAFKA-1115:
--

Status: Patch Available  (was: Open)

 producer performance affected by trace/debug calls
 --

 Key: KAFKA-1115
 URL: https://issues.apache.org/jira/browse/KAFKA-1115
 Project: Kafka
  Issue Type: Improvement
  Components: producer 
Affects Versions: 0.8
Reporter: Francois Saint-Jacques
Assignee: Francois Saint-Jacques

 After investigating high CPU usage on some producers in production, we found 
 out that a lot of time was passed in string construction for logging of DEBUG 
 and TRACE level.
 This patch removes most of the logging calls, on our systems it cuts CPU 
 usage down to half of what it used to be.
 Note that this is a significant boost in performance for environment where 
 there are thousands of msg/s.



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Updated] (KAFKA-1115) producer performance affected by trace/debug calls

2013-11-01 Thread Francois Saint-Jacques (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-1115?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Francois Saint-Jacques updated KAFKA-1115:
--

Attachment: producer-performance-fix.patch

 producer performance affected by trace/debug calls
 --

 Key: KAFKA-1115
 URL: https://issues.apache.org/jira/browse/KAFKA-1115
 Project: Kafka
  Issue Type: Improvement
  Components: producer 
Affects Versions: 0.8
Reporter: Francois Saint-Jacques
Assignee: Francois Saint-Jacques
 Attachments: producer-performance-fix.patch


 After investigating high CPU usage on some producers in production, we found 
 out that a lot of time was passed in string construction for logging of DEBUG 
 and TRACE level.
 This patch removes most of the logging calls, on our systems it cuts CPU 
 usage down to half of what it used to be.
 Note that this is a significant boost in performance for environment where 
 there are thousands of msg/s.



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Updated] (KAFKA-1115) producer performance affected by trace/debug calls

2013-11-01 Thread Francois Saint-Jacques (JIRA)

 [ 
https://issues.apache.org/jira/browse/KAFKA-1115?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Francois Saint-Jacques updated KAFKA-1115:
--

Status: Open  (was: Patch Available)

 producer performance affected by trace/debug calls
 --

 Key: KAFKA-1115
 URL: https://issues.apache.org/jira/browse/KAFKA-1115
 Project: Kafka
  Issue Type: Improvement
  Components: producer 
Affects Versions: 0.8
Reporter: Francois Saint-Jacques
Assignee: Francois Saint-Jacques
 Attachments: producer-performance-fix.patch


 After investigating high CPU usage on some producers in production, we found 
 out that a lot of time was passed in string construction for logging of DEBUG 
 and TRACE level.
 This patch removes most of the logging calls, on our systems it cuts CPU 
 usage down to half of what it used to be.
 Note that this is a significant boost in performance for environment where 
 there are thousands of msg/s.



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Commented] (KAFKA-1084) Validate properties for custom serializers

2013-10-15 Thread Francois Saint-Jacques (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-1084?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13795202#comment-13795202
 ] 

Francois Saint-Jacques commented on KAFKA-1084:
---

I believe a warning will still get logged for unknown string properties since 
the patch in KAFKA-1049 doesn't touch the validate function.

 Validate properties for custom serializers
 --

 Key: KAFKA-1084
 URL: https://issues.apache.org/jira/browse/KAFKA-1084
 Project: Kafka
  Issue Type: Improvement
Reporter: Francois Saint-Jacques
Priority: Minor
 Attachments: validate-external-properties.patch


 We use specifics encoder/decoder for our producers/consumers, they get 
 correctly initialized by the Producer/Consumer. The only downside is the 
 validate() function of VerifiableProperties that pollutes our log stream.
 This patch allows custom serializers keys to validate correctly if they begin 
 with the external prefix, for example:
 external.my.encoder.param=true
 will not raise a WARN.



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Created] (KAFKA-1081) kafka-run-class.sh is broken

2013-10-10 Thread Francois Saint-Jacques (JIRA)
Francois Saint-Jacques created KAFKA-1081:
-

 Summary: kafka-run-class.sh is broken
 Key: KAFKA-1081
 URL: https://issues.apache.org/jira/browse/KAFKA-1081
 Project: Kafka
  Issue Type: Bug
Affects Versions: 0.8
Reporter: Francois Saint-Jacques


Please apply this patch, this is why log4j exists. Rerunning at 
non-deterministic command twice to catch error message is extremely dangerous.

diff --git a/bin/kafka-run-class.sh b/bin/kafka-run-class.sh
index eb6ff1b..2f2d8b5 100755
--- a/bin/kafka-run-class.sh
+++ b/bin/kafka-run-class.sh
@@ -102,19 +102,3 @@ if [ $1 = daemon ]  [ -z $KAFKA_GC_LOG_OPTS] ; then
 fi

 $JAVA $KAFKA_HEAP_OPTS $KAFKA_JVM_PERFORMANCE_OPTS $KAFKA_GC_LOG_OPTS 
$KAFKA_JMX_OPTS $KAFKA_LOG4J_OPTS -cp $CLASSPATH $KAFKA_OPTS $@
-
-exitval=$?
-
-if [ $exitval -eq 1 ] ; then
-   $JAVA $KAFKA_HEAP_OPTS $KAFKA_JVM_PERFORMANCE_OPTS $KAFKA_GC_LOG_OPTS 
$KAFKA_JMX_OPTS $KAFKA_LOG4J_OPTS -cp $CLASSPATH $KAFKA_OPTS $@  
exception.txt
-   exception=`cat exception.txt`
-   noBuildMessage='Please build the project using sbt. Documentation is 
available at http://kafka.apache.org/'
-   pattern=(Could not find or load main 
class)|(java\.lang\.NoClassDefFoundError)
-   match=`echo $exception | grep -E $pattern`
-   if [[ -n $match ]]; then
-   echo $noBuildMessage
-   fi
-   rm exception.txt
-fi
-
-



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Commented] (KAFKA-1081) kafka-run-class.sh is broken

2013-10-10 Thread Francois Saint-Jacques (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-1081?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13791819#comment-13791819
 ] 

Francois Saint-Jacques commented on KAFKA-1081:
---

Look for the 3 last lines, not the usage error.

$ cd /
$ /opt/kafka/bin/kafka-list-topic.sh
Missing required argument [zookeeper]
Option  Description
--  ---
--topic topic REQUIRED: The topic to be listed.
  Defaults to all existing topics.
  (default: )
--unavailable-partitionsif set, only show partitions whose
  leader is not available
--under-replicated-partitions   if set, only show under replicated
  partitions
--zookeeper urls  REQUIRED: The connection string for
  the zookeeper connection in the form
  host:port. Multiple URLS can be
  given to allow fail-over.
/opt/kafka/bin/kafka-run-class.sh: line 72: exception.txt: Permission denied
cat: exception.txt: No such file or directory
rm: cannot remove 'exception.txt': No such file or directory

 kafka-run-class.sh is broken
 

 Key: KAFKA-1081
 URL: https://issues.apache.org/jira/browse/KAFKA-1081
 Project: Kafka
  Issue Type: Bug
Affects Versions: 0.8
Reporter: Francois Saint-Jacques

 Please apply this patch, this is why log4j exists. Rerunning at 
 non-deterministic command twice to catch error message is extremely dangerous.
 diff --git a/bin/kafka-run-class.sh b/bin/kafka-run-class.sh
 index eb6ff1b..2f2d8b5 100755
 --- a/bin/kafka-run-class.sh
 +++ b/bin/kafka-run-class.sh
 @@ -102,19 +102,3 @@ if [ $1 = daemon ]  [ -z $KAFKA_GC_LOG_OPTS] ; 
 then
  fi
  $JAVA $KAFKA_HEAP_OPTS $KAFKA_JVM_PERFORMANCE_OPTS $KAFKA_GC_LOG_OPTS 
 $KAFKA_JMX_OPTS $KAFKA_LOG4J_OPTS -cp $CLASSPATH $KAFKA_OPTS $@
 -
 -exitval=$?
 -
 -if [ $exitval -eq 1 ] ; then
 -   $JAVA $KAFKA_HEAP_OPTS $KAFKA_JVM_PERFORMANCE_OPTS $KAFKA_GC_LOG_OPTS 
 $KAFKA_JMX_OPTS $KAFKA_LOG4J_OPTS -cp $CLASSPATH $KAFKA_OPTS $@  
 exception.txt
 -   exception=`cat exception.txt`
 -   noBuildMessage='Please build the project using sbt. Documentation is 
 available at http://kafka.apache.org/'
 -   pattern=(Could not find or load main 
 class)|(java\.lang\.NoClassDefFoundError)
 -   match=`echo $exception | grep -E $pattern`
 -   if [[ -n $match ]]; then
 -   echo $noBuildMessage
 -   fi
 -   rm exception.txt
 -fi
 -
 -



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Commented] (KAFKA-1081) kafka-run-class.sh is broken

2013-10-10 Thread Francois Saint-Jacques (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-1081?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13791870#comment-13791870
 ] 

Francois Saint-Jacques commented on KAFKA-1081:
---

Look, this is an ugly hack. The real problem here is not the directory 
permission or using a temp file but RERUNNING the first java command. 

I'm not even trying to build it, I'm trying to correctly package kafka on a 
production server. Whenever I run any command (bin/*) that doesn't return 
properly, it borks if kafka-run-class.sh is called within a directory where the 
user don't have write permission.

I understand that these lines are there to help new users who checkout the 
project and forget to build before running any command, but we're talking of 
deploying quality code in production.

 kafka-run-class.sh is broken
 

 Key: KAFKA-1081
 URL: https://issues.apache.org/jira/browse/KAFKA-1081
 Project: Kafka
  Issue Type: Bug
Affects Versions: 0.8
Reporter: Francois Saint-Jacques

 Please apply this patch, this is why log4j exists. Rerunning at 
 non-deterministic command twice to catch error message is extremely dangerous.
 diff --git a/bin/kafka-run-class.sh b/bin/kafka-run-class.sh
 index eb6ff1b..2f2d8b5 100755
 --- a/bin/kafka-run-class.sh
 +++ b/bin/kafka-run-class.sh
 @@ -102,19 +102,3 @@ if [ $1 = daemon ]  [ -z $KAFKA_GC_LOG_OPTS] ; 
 then
  fi
  $JAVA $KAFKA_HEAP_OPTS $KAFKA_JVM_PERFORMANCE_OPTS $KAFKA_GC_LOG_OPTS 
 $KAFKA_JMX_OPTS $KAFKA_LOG4J_OPTS -cp $CLASSPATH $KAFKA_OPTS $@
 -
 -exitval=$?
 -
 -if [ $exitval -eq 1 ] ; then
 -   $JAVA $KAFKA_HEAP_OPTS $KAFKA_JVM_PERFORMANCE_OPTS $KAFKA_GC_LOG_OPTS 
 $KAFKA_JMX_OPTS $KAFKA_LOG4J_OPTS -cp $CLASSPATH $KAFKA_OPTS $@  
 exception.txt
 -   exception=`cat exception.txt`
 -   noBuildMessage='Please build the project using sbt. Documentation is 
 available at http://kafka.apache.org/'
 -   pattern=(Could not find or load main 
 class)|(java\.lang\.NoClassDefFoundError)
 -   match=`echo $exception | grep -E $pattern`
 -   if [[ -n $match ]]; then
 -   echo $noBuildMessage
 -   fi
 -   rm exception.txt
 -fi
 -
 -



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Commented] (KAFKA-1081) kafka-run-class.sh is broken

2013-10-10 Thread Francois Saint-Jacques (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-1081?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13791901#comment-13791901
 ] 

Francois Saint-Jacques commented on KAFKA-1081:
---

I know you guys have a binary release, this is what I'm deploying. My point is, 
this specific snippet should never go in production release.

 kafka-run-class.sh is broken
 

 Key: KAFKA-1081
 URL: https://issues.apache.org/jira/browse/KAFKA-1081
 Project: Kafka
  Issue Type: Bug
Affects Versions: 0.8
Reporter: Francois Saint-Jacques

 Please apply this patch, this is why log4j exists. Rerunning at 
 non-deterministic command twice to catch error message is extremely dangerous.
 diff --git a/bin/kafka-run-class.sh b/bin/kafka-run-class.sh
 index eb6ff1b..2f2d8b5 100755
 --- a/bin/kafka-run-class.sh
 +++ b/bin/kafka-run-class.sh
 @@ -102,19 +102,3 @@ if [ $1 = daemon ]  [ -z $KAFKA_GC_LOG_OPTS] ; 
 then
  fi
  $JAVA $KAFKA_HEAP_OPTS $KAFKA_JVM_PERFORMANCE_OPTS $KAFKA_GC_LOG_OPTS 
 $KAFKA_JMX_OPTS $KAFKA_LOG4J_OPTS -cp $CLASSPATH $KAFKA_OPTS $@
 -
 -exitval=$?
 -
 -if [ $exitval -eq 1 ] ; then
 -   $JAVA $KAFKA_HEAP_OPTS $KAFKA_JVM_PERFORMANCE_OPTS $KAFKA_GC_LOG_OPTS 
 $KAFKA_JMX_OPTS $KAFKA_LOG4J_OPTS -cp $CLASSPATH $KAFKA_OPTS $@  
 exception.txt
 -   exception=`cat exception.txt`
 -   noBuildMessage='Please build the project using sbt. Documentation is 
 available at http://kafka.apache.org/'
 -   pattern=(Could not find or load main 
 class)|(java\.lang\.NoClassDefFoundError)
 -   match=`echo $exception | grep -E $pattern`
 -   if [[ -n $match ]]; then
 -   echo $noBuildMessage
 -   fi
 -   rm exception.txt
 -fi
 -
 -



--
This message was sent by Atlassian JIRA
(v6.1#6144)