Offset Editor is a Java application that allows users to read, edit, and save files containing offset data. It offers a command-line interface (CLI) and a graphical user interface (GUI) for convenient editing of offset data files. This is helpful if you're using Debezium Server and wish to set an offset to a particular value (for example, to process or re-process earlier values).
- Java Development Kit (JDK) 11 or higher
- Java JFX 16 or higher
- Clone the repository or download the source code to your local machine.
- Open a terminal/command prompt and navigate to the project directory.
- To compile the project using Maven, execute the following command:
mvn clean install
This command will generate a shaded JAR file (a JAR file containing all the necessary dependencies) in the target
directory.
To run the application using the graphical user interface, double-click the offset-editor-1.0-SNAPSHOT-shaded.jar.
This will open the Offset Editor window. Follow the steps below to edit and save your offset data:
- Click the "Select File" button and choose the input file containing the offset data.
- The table will be populated with the key-value pairs from the input file. Click on any cell in the "Value" column to edit its value.
- After editing the values, click the "Save" button to save your changes. You will be prompted to choose a location and file name for the output file.
You can run the application using the command-line interface by executing the following command:
java -jar target/OffsetEditor-1.0-SNAPSHOT-jar-with-dependencies.jar <inputFile> <outputFile> <newKey> <newValue>
The required parameters are:
inputFile
: Path to the input fileoutputFile
: Path to the output filenewKey
: Key to be editednewValue
: New value for the key (optional)