[
https://issues.apache.org/jira/browse/CASSANDRA-19335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17843613#comment-17843613
]
Leo Toff edited comment on CASSANDRA-19335 at 5/6/24 3:50 AM:
--------------------------------------------------------------
CCM wouldn't run in a container, and `pytest` fails because of that. All
vanilla except C* itself which contains my changes. I'm going to ask the dev
mailing list for help.
The errors I'm getting are:
"NoneType' object has no attribute 'stderr_file"
"Node node1 should be running before waiting for <started listening> log
message, but C* process is terminated."
"No such file or directory: '/home/drift/cassandra/trunk/build.xml'"
Here's what I'm doing:
0. Compile C* with my changes (with Java 11):
{code:java}
$ ant clean build{code}
1. Start a container
[https://cassandra.apache.org/_/development/testing.html#start-the-container]:
{code:java}
$ docker run -di -m 8G --cpus 4 \
--mount
type=bind,source=<local_path_to_cassandra>,target=/home/cassandra/cassandra \
--mount
type=bind,source=<local_path_to_cassandra-dtest>,target=/home/cassandra/cassandra-dtest
\
--name test apache/cassandra-testing-ubuntu2004-java11-w-dependencies \
dumb-init bash{code}
2. Log into the container:
{code:java}
$ docker exec -it `docker container ls -f name=test -q` bash{code}
3. Set up Java 11 within the container:
{code:java}
$ sudo apt-get update
$ sudo apt-get install openjdk-11-jdk
$ sudo update-alternatives --config java{code}
4. Run CCM
[https://cassandra.apache.org/_/development/testing.html#cqlsh_tests]:
{code:java}
$ ccm create test -n 1 --install-dir=/home/cassandra/cassandra
$ ccm updateconf "enable_user_defined_functions: true"
$ ccm updateconf "enable_scripted_user_defined_functions: true"
$ ccm updateconf "cdc_enabled: true"
$ ccm start --wait-for-binary-proto{code}
The last command terminates with an error (see [^c-19335-dtest-ccm-fail.txt])
5. Setup Python env
[https://cassandra.apache.org/_/development/testing.html#setup_python_env]:
{code:java}
$ cd /home/cassandra/cassandra-dtest
$ virtualenv --python=python3 --clear --always-copy ../dtest-venv
$ source ../dtest-venv/bin/activate
$ CASS_DRIVER_NO_CYTHON=1 pip install -r requirements.txt{code}
6. Run the target tests:
{code:java}
$ pytest --cassandra-dir=/home/cassandra/cassandra
bootstrap_test.py::TestBootstrap::test_simple_bootstrap_with_ssl{code}
Error: see [^c-19335-dtest-bootstraptest-fail.txt])
{code:java}
$ pytest --cassandra-dir=/home/drift/cassandra/trunk
compaction_test.py::TestCompaction::test_data_size{code}
Error: see [^c-19335-dtest-compactiontest-fail.txt]
What am I missing?
was (Author: JIRAUSER303078):
CCM wouldn't run in a container, and `pytest` fails because of that. All
vanilla except C* itself which contains my changes. I'm going to ask the dev
mailing list for help.
The errors I'm getting are:
"NoneType' object has no attribute 'stderr_file"
"Node node1 should be running before waiting for <started listening> log
message, but C* process is terminated."
"No such file or directory: '/home/drift/cassandra/trunk/build.xml'"
Here's what I'm doing:
0. Compile C* with my changes (with Java 11):
{code:java}
$ ant clean build{code}
1. Start a container
[https://cassandra.apache.org/_/development/testing.html#start-the-container]:
{code:java}
$ docker run -di -m 8G --cpus 4 \
--mount
type=bind,source=<local_path_to_cassandra>,target=/home/cassandra/cassandra \
--mount
type=bind,source=<local_path_to_cassandra-dtest>,target=/home/cassandra/cassandra-dtest
\
--name test apache/cassandra-testing-ubuntu2004-java11-w-dependencies \
dumb-init bash{code}
2. Log into the container:
{code:java}
$ docker exec -it `docker container ls -f name=test -q` bash{code}
3. Set up Java 11 within the container:
{code:java}
$ sudo apt-get update
$ sudo apt-get install openjdk-11-jdk
$ sudo update-alternatives --config java{code}
4. Run CCM
[https://cassandra.apache.org/_/development/testing.html#cqlsh_tests]:
{code:java}
$ ccm create test -n 1 --install-dir=/home/cassandra/cassandra
$ ccm updateconf "enable_user_defined_functions: true"
$ ccm updateconf "enable_scripted_user_defined_functions: true"
$ ccm updateconf "cdc_enabled: true"
$ ccm start --wait-for-binary-proto{code}
The last command terminates with an error (see [^c-19335-dtest-ccm-fail.txt])
5. Run the target tests:
{code:java}
$ pytest --cassandra-dir=/home/cassandra/cassandra
bootstrap_test.py::TestBootstrap::test_simple_bootstrap_with_ssl{code}
Error: see [^c-19335-dtest-bootstraptest-fail.txt])
{code:java}
$ pytest --cassandra-dir=/home/drift/cassandra/trunk
compaction_test.py::TestCompaction::test_data_size{code}
Error: see [^c-19335-dtest-compactiontest-fail.txt]
What am I missing?
> Default nodetool tablestats to Human-Readable Output
> ----------------------------------------------------
>
> Key: CASSANDRA-19335
> URL: https://issues.apache.org/jira/browse/CASSANDRA-19335
> Project: Cassandra
> Issue Type: Improvement
> Components: Tool/nodetool
> Reporter: Leo Toff
> Assignee: Leo Toff
> Priority: Low
> Fix For: 5.x
>
> Attachments: c-19335-dtest-bootstraptest-fail.txt,
> c-19335-dtest-ccm-fail.txt, c-19335-dtest-compactiontest-fail.txt
>
> Time Spent: 50m
> Remaining Estimate: 0h
>
> *Current Behavior*
> The current implementation of nodetool tablestats in Apache Cassandra outputs
> statistics in a format that is not immediately human-readable. This output
> primarily includes raw byte counts, which require additional calculation or
> conversion to be easily understood by users. This can be inefficient and
> time-consuming, especially for users who frequently monitor these statistics
> for performance tuning or maintenance purposes.
> *Proposed Change*
> We propose that nodetool tablestats should, by default, provide its output in
> a human-readable format. This change would involve converting byte counts
> into more understandable units (KiB, MiB, GiB). The tool could still retain
> the option to display raw data for those who need it, perhaps through a flag
> such as --no-human-readable or --raw.
> *Considerations*
> The change should maintain backward compatibility, ensuring that scripts or
> tools relying on the current output format can continue to function correctly.
> We should provide adequate documentation and examples of both the new default
> output and how to access the raw data format, if needed.
> *Alignment*
> Discussion in the dev mailing list:
> [https://lists.apache.org/thread/mlp715kxho5b6f1ql9omlzmmnh4qfby9]
> *Related work*
> Previous work in the series:
> # https://issues.apache.org/jira/browse/CASSANDRA-19015
> # https://issues.apache.org/jira/browse/CASSANDRA-19104
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]