Skip to content

Commit

Permalink
Merge branch 'osalvador:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
stalincalderon committed Jun 12, 2024
2 parents 3debec2 + a403483 commit bd470b4
Show file tree
Hide file tree
Showing 21 changed files with 25,045 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI_Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
context: .
file: Containerfile
push: ${{ github.event_name != 'pull_request' }}
tags: osalvador/replicadb:ubi8-${{ env.version }}, osalvador/replicadb:ubi8-latest
tags: osalvador/replicadb:ubi9-${{ env.version }}, osalvador/replicadb:ubi9-latest
build-args: REPLICADB_RELEASE_VERSION=${{ env.version }}


Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/CT_PushJDK11.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Only CI/CT JDK11

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'adopt'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file

- name: Get version
run: echo "version=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec) " >> $GITHUB_ENV

- name: Build and Integration Tests
run: mvn -B package --file pom.xml

- name: Clean Install
run: |
export REPLICADB_RELEASE_VERSION=${{ env.version }}
echo ${REPLICADB_RELEASE_VERSION}
mvn clean install -Dmaven.javadoc.skip=true -DskipTests -B -V -P release
cp ./target/ReplicaDB-*.jar .
mkdir lib
echo ${REPLICADB_RELEASE_VERSION}
cp ./target/lib/* ./lib
tar -zcvf ReplicaDB-v${REPLICADB_RELEASE_VERSION}.tar.gz ReplicaDB-*.jar README.md lib conf bin LICENSE
zip -r -X ReplicaDB-v${REPLICADB_RELEASE_VERSION}.zip ReplicaDB-*.jar README.md lib conf bin LICENSE
ls -lahtr
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ data/*
create_db.log
create_db_error.log
.DS_Store
.vscode
2 changes: 1 addition & 1 deletion Containerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM registry.access.redhat.com/ubi8/openjdk-11-runtime
FROM registry.access.redhat.com/ubi9/openjdk-11-runtime
LABEL maintainer Oscar Salvador Magallanes
LABEL maintainer Francesco Zanti <francesco@tekapp.it>

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,12 @@ Visit the [project homepage on Docker Hub](https://hub.docker.com/r/osalvador/re

## Podman

Based on Red Hat UBI 8
Based on Red Hat UBI 9

```bash
$ podman run \
-v /tmp/replicadb.conf:/home/replicadb/conf/replicadb.conf:Z \
osalvador/replicadb:ubi8-latest
osalvador/replicadb:ubi9-latest
```

# Full Documentation
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.3.7</version>
<version>42.7.2</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -313,7 +313,7 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>[30.0-jre,)</version>
<version>32.1.3-jre</version>
</dependency>

<!-- <dependency>-->
Expand Down
16 changes: 8 additions & 8 deletions src/main/java/org/replicadb/cli/ToolOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class ToolOptions {
private String sinkStagingTableAlias;
private String sinkStagingSchema;
private String sinkColumns;
private String sinkFileformat;
private String sinkFileFormat;
private Boolean sinkDisableEscape = false;
private Boolean sinkDisableIndex = false;
private Boolean sinkDisableTruncate = false;
Expand Down Expand Up @@ -476,7 +476,7 @@ private void loadOptionsFile() throws IOException {
setBandwidthThrottling(prop.getProperty("bandwidth.throttling"));
setQuotedIdentifiers(Boolean.parseBoolean(prop.getProperty("quoted.identifiers")));
setSourceFileFormat(prop.getProperty("source.file.format"));
setSinkFileformat(prop.getProperty("sink.file.format"));
setSinkFileFormat(prop.getProperty("sink.file.format"));
setSentryDsn(prop.getProperty("sentry.dsn"));

// Connection params
Expand Down Expand Up @@ -891,7 +891,7 @@ public String toString() {
",\n\tsourceConnectionParams=" + sourceConnectionParams +
",\n\tsinkConnectionParams=" + sinkConnectionParams +
",\n\tsourceFileFormat='" + sourceFileFormat + '\'' +
",\n\tsinkFileformat='" + sinkFileformat + '\'' +
",\n\tsinkFileformat='" + sinkFileFormat + '\'' +
'}';
}

Expand Down Expand Up @@ -938,17 +938,17 @@ private void setSourceFileFormatNotNull(String fileFormat) {
this.sourceFileFormat = fileFormat;
}

public String getSinkFileformat() {
return sinkFileformat;
public String getSinkFileFormat() {
return sinkFileFormat;
}

public void setSinkFileformat(String sinkFileformat) {
this.sinkFileformat = sinkFileformat;
public void setSinkFileFormat(String sinkFileFormat) {
this.sinkFileFormat = sinkFileFormat;
}

private void setSinkFileFormatNotNull(String fileFormat) {
if (fileFormat != null && !fileFormat.isEmpty())
this.sinkFileformat = fileFormat;
this.sinkFileFormat = fileFormat;
}

public String getSentryDsn() {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/replicadb/config/Sentry.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public static void SentryInit(ToolOptions options) {
scope.setTag("source.connect", options.getSourceConnect());
scope.setTag("sink.connect", options.getSinkConnect());
if (options.getVersion() != null) scope.setTag("release.version", options.getVersion());
if (options.getSinkFileformat() != null) scope.setTag("sink.file_format", options.getSinkFileformat());
if (options.getSinkFileFormat() != null) scope.setTag("sink.file_format", options.getSinkFileFormat());
if (options.getSourceFileFormat() != null)
scope.setTag("source.file_format", options.getSourceFileFormat());
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public FileManager accept(ToolOptions options, DataSourceType dsType) {
if (dsType == DataSourceType.SOURCE) {
fileFormat = options.getSourceFileFormat();
} else if (dsType == DataSourceType.SINK) {
fileFormat = options.getSinkFileformat();
fileFormat = options.getSinkFileFormat();
} else {
LOG.error("DataSourceType must be Source or Sink");
}
Expand Down
13 changes: 9 additions & 4 deletions src/main/java/org/replicadb/rowset/StreamingRowSetImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
* questions.
*/

import org.replicadb.rowset.sun.rowset.internal.BaseRow;
import org.replicadb.rowset.sun.rowset.internal.CachedRowSetReader;
import org.replicadb.rowset.sun.rowset.internal.InsertRow;
import org.replicadb.rowset.sun.rowset.internal.Row;

import java.sql.*;
import javax.sql.*;
import java.io.*;
Expand All @@ -35,8 +40,8 @@
import javax.sql.rowset.spi.*;
import javax.sql.rowset.serial.*;

import com.sun.rowset.internal.*;
import com.sun.rowset.providers.*;
//import com.sun.rowset.internal.*;
//import com.sun.rowset.providers.*;

/**
* The standard implementation of the <code>CachedRowSet</code> interface.
Expand Down Expand Up @@ -343,9 +348,9 @@ public StreamingRowSetImpl () throws SQLException {
// set the Reader, this maybe overridden latter
provider = crs.getSyncProvider();

if (!(provider instanceof RIOptimisticProvider)) {
/* if (!(provider instanceof RIOptimisticProvider)) {
throw new SQLException(resBundle.handleGetObject("cachedrowsetimpl.invalidp").toString());
}
}*/

rowSetReader = provider.getRowSetReader();
rowSetWriter = provider.getRowSetWriter();
Expand Down
Loading

0 comments on commit bd470b4

Please sign in to comment.