Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --format flag to ec-admin running for structured output (CSV/JSON) #5332

Open
wants to merge 9 commits into
base: 2.1
Choose a base branch
from

Conversation

Suvrat1629
Copy link
Contributor

This PR enhances the accumulo ec-admin running command by adding a --format flag to support structured output in CSV and JSON formats. This allows for easier programmatic parsing of running compaction details.

Changes Introduced:
Added --format flag (json, csv, human [default]) to ec-admin running.
Implemented structured output formatting for better readability and parsing.
Updated runningCompactions() method to handle different output formats.
Ensured compatibility with existing behavior by keeping table format as the default.

Fixes #5205

@Suvrat1629
Copy link
Contributor Author

@kevinrr888 I hope this fixes the fix the issue with the commit history :)

Copy link
Member

@kevinrr888 kevinrr888 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General comments. I suggest running mvn clean verify -Psunny before committing future changes. This will catch a lot of potential issues with new code.

@ddanielr ddanielr added this to the 2.1.4 milestone Feb 13, 2025
@kevinrr888 kevinrr888 dismissed their stale review February 14, 2025 15:29

Concerns regarding build failures have been addressed. No further comments at this time

@dlmarion
Copy link
Contributor

This looks pretty good. Have you tested this locally?

@Suvrat1629
Copy link
Contributor Author

@dlmarion No, I did not understand how to setup the development environment but I wanted to contribute so I decided to open a pr regardless. Sorry about that😅

@dlmarion
Copy link
Contributor

@Suvrat1629 - I would suggest looking at https://github.com/apache/fluo-uno to get a development environment set up so that you can test this locally.

@Suvrat1629
Copy link
Contributor Author

@dlmarion

git clone https://github.com/apache/fluo-uno.git
cd fluo-uno
./bin/uno fetch accumulo            # Fetches binary tarballs of Accumulo and its dependencies
./bin/uno setup accumulo            # Sets up Accumulo and its dependencies (Hadoop & ZooKeeper)
source <(./bin/uno env)             # Bash-specific command that sets up current shell

I ran this command and got done with the set up.
But i don't how I can test the changes that I have made locally. Where do i run the ./accumulo ec-admin command?

@dlmarion
Copy link
Contributor

@Suvrat1629 - looking at the fluo-uno readme, it looks like you should be able to set the ACCUMULO_REPO environment variable in the uno.conf file and then fluo-uno will build Accumulo from your feature branch. See https://github.com/apache/fluo-uno/blob/main/conf/uno.conf#L46. Once everything is running, Accumulo should be running from the directory specified by the ACCUMULO_HOME variable (see https://github.com/apache/fluo-uno/blob/main/conf/uno.conf#L126). You should be able to run the accumulo ec-admin from the bin directory in $ACCUMULO_HOME.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants