Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
contents: read
strategy:
matrix:
java: ['8', '11','17','21']
java: ['11','17','21']
name: Java ${{ matrix.java }}
steps:
- name: Azure login
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
environment: build
strategy:
matrix:
java: [ '8' ]
java: [ '11' ]
name: Java ${{ matrix.java }}
steps:
- uses: actions/checkout@v4
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [8.0.0] - 2026-01-07

### Changed
- **[BREAKING] Minimum Java version requirement updated to Java 11.** Previous versions supported Java 8.
Starting with version 8.0.0, Java 11 or later is required to use this SDK.

## [7.0.5] - 2025-12-24

### Fixed
Expand Down
3 changes: 1 addition & 2 deletions data/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<release>${java.version}</release>
</configuration>
</plugin>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import java.io.File;
import java.net.URI;
import java.net.URISyntaxException;
import java.nio.file.Paths;
import java.nio.file.Path;
import java.util.Objects;

public class UriUtils {
Expand Down Expand Up @@ -115,7 +115,7 @@ public static String stripFileNameFromCommandLine(String cmdLine) {
String processNameForTracing = cmdLine;

if (processNameForTracing != null) {
processNameForTracing = Paths.get(processNameForTracing.trim().split(" ")[0]).getFileName().toString();
processNameForTracing = Path.of(processNameForTracing.trim().split(" ")[0]).getFileName().toString();
}

return processNameForTracing;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

import java.io.IOException;
import java.net.URISyntaxException;
import java.nio.file.Paths;
import java.nio.file.Path;
import java.security.PrivateKey;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
Expand Down Expand Up @@ -64,8 +64,8 @@ void createWithUserPrompt() {
void createWithAadApplicationCertificate() throws CertificateException, OperatorCreationException,
PKCSException, IOException {

String certFilePath = Paths.get("src", "test", "resources", "cert.cer").toString();
String privateKeyPath = Paths.get("src", "test", "resources", "key.pem").toString();
String certFilePath = Path.of("src", "test", "resources", "cert.cer").toString();
String privateKeyPath = Path.of("src", "test", "resources", "key.pem").toString();

X509Certificate x509Certificate = readPem(certFilePath, "basic").getCertificate();
PrivateKey privateKey = readPem(privateKeyPath, "basic").getKey();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import java.net.UnknownHostException;
import java.nio.ByteBuffer;
import java.nio.charset.StandardCharsets;
import java.nio.file.Paths;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
Expand Down Expand Up @@ -150,7 +150,7 @@ void removeExtensionFromFileName() {
@Test
@DisplayName("Assert file name extracted from some cmd line")
void extractFileNameFromCommandLine() {
String cmdLine = Paths.get(" home", "user", "someFile.jar") + " -arg1 val";
String cmdLine = Path.of(" home", "user", "someFile.jar") + " -arg1 val";
Assertions.assertEquals(UriUtils.stripFileNameFromCommandLine(cmdLine), "someFile.jar");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import java.io.IOException;
import java.lang.reflect.Field;
import java.net.URISyntaxException;
import java.nio.file.Paths;
import java.nio.file.Path;
import java.security.PrivateKey;
import java.security.Security;
import java.security.cert.CertificateException;
Expand Down Expand Up @@ -59,8 +59,8 @@ public static void setUp() throws URISyntaxException {
@DisplayName("validate auth with certificate throws exception when missing or invalid parameters")
void acquireWithClientCertificateNullKey() throws CertificateException, OperatorCreationException,
PKCSException, IOException, URISyntaxException {
String certFilePath = Paths.get("src", "test", "resources", "cert.cer").toString();
String privateKeyPath = Paths.get("src", "test", "resources", "key.pem").toString();
String certFilePath = Path.of("src", "test", "resources", "cert.cer").toString();
String privateKeyPath = Path.of("src", "test", "resources", "key.pem").toString();

X509Certificate x509Certificate = readPem(certFilePath, "basic").getCertificate();
PrivateKey privateKey = readPem(privateKeyPath, "basic").getKey();
Expand Down Expand Up @@ -114,8 +114,8 @@ public static KeyCert readPem(String path, String password)
@DisplayName("validate cached token. Refresh if needed. Call regularly if no refresh token")
void useCachedTokenAndRefreshWhenNeeded()
throws IOException, DataServiceException, URISyntaxException, CertificateException, OperatorCreationException, PKCSException, DataClientException {
String certFilePath = Paths.get("src", "test", "resources", "cert.cer").toString();
String privateKeyPath = Paths.get("src", "test", "resources", "key.pem").toString();
String certFilePath = Path.of("src", "test", "resources", "cert.cer").toString();
String privateKeyPath = Path.of("src", "test", "resources", "key.pem").toString();

X509Certificate x509Certificate = readPem(certFilePath, "basic").getCertificate();
PrivateKey privateKey = readPem(privateKeyPath, "basic").getKey();
Expand Down
3 changes: 1 addition & 2 deletions ingest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<release>${java.version}</release>
</configuration>
</plugin>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.Path;

import static com.microsoft.azure.kusto.ingest.IngestClientBase.shouldCompress;
import static org.junit.jupiter.api.Assertions.assertThrows;
Expand All @@ -38,9 +38,9 @@ class AzureStorageClientTest {

@BeforeAll
static void setUp() {
testFilePath = Paths.get("src", "test", "resources", "testdata.json").toString();
testFilePath = Path.of("src", "test", "resources", "testdata.json").toString();
testFile = new File(testFilePath);
String testFilePathCompressed = Paths.get("src", "test", "resources", "testdata.json.gz").toString();
String testFilePathCompressed = Path.of("src", "test", "resources", "testdata.json.gz").toString();
testFileCompressed = new File(testFilePathCompressed);
blob = TestUtils.containerWithSasFromContainerName("storageUrl").getAsyncContainer().getBlobAsyncClient("bloby");
}
Expand Down Expand Up @@ -145,7 +145,7 @@ void uploadLocalFileToBlob_FileDoesNotExist_IOException() {

@Test
void uploadStreamToBlob_NotCompressMode_UploadStreamIsCalled() throws IOException {
try (InputStream stream = Files.newInputStream(Paths.get(testFilePath))) {
try (InputStream stream = Files.newInputStream(Path.of(testFilePath))) {
doAnswer(answer -> Mono.just(10))
.when(azureStorageClientSpy)
.uploadStream(any(InputStream.class), any(BlobAsyncClient.class));
Expand All @@ -158,7 +158,7 @@ void uploadStreamToBlob_NotCompressMode_UploadStreamIsCalled() throws IOExceptio

@Test
void uploadStreamToBlob_CompressMode_CompressAndUploadStreamIsCalled() throws IOException {
try (InputStream stream = Files.newInputStream(Paths.get(testFilePath))) {
try (InputStream stream = Files.newInputStream(Path.of(testFilePath))) {
doAnswer(answer -> Mono.just(10))
.when(azureStorageClientSpy)
.compressAndUploadStream(any(InputStream.class), any(BlobAsyncClient.class));
Expand All @@ -179,7 +179,7 @@ void UploadStreamToBlob_NullInputStream_IllegalArgumentException() {

@Test
void uploadStreamToBlob_NullBlobName_IllegalArgumentException() throws IOException {
try (InputStream stream = Files.newInputStream(Paths.get(testFilePath))) {
try (InputStream stream = Files.newInputStream(Path.of(testFilePath))) {
BlobContainerAsyncClient storageUrl = new BlobContainerClientBuilder().endpoint("https://blobPath.blob.core.windows.net/container/blob")
.buildAsyncClient();
assertThrows(
Expand All @@ -190,7 +190,7 @@ void uploadStreamToBlob_NullBlobName_IllegalArgumentException() throws IOExcepti

@Test
void uploadStreamToBlob_NullStorageUri_IllegalArgumentException() throws IOException {
try (InputStream stream = Files.newInputStream(Paths.get(testFilePath))) {
try (InputStream stream = Files.newInputStream(Path.of(testFilePath))) {
assertThrows(
IllegalArgumentException.class,
() -> azureStorageClient.uploadStreamToBlob(stream, "blobName", null, false));
Expand Down Expand Up @@ -235,7 +235,7 @@ void uploadStream_NullInputStream_IllegalArgumentException() {

@Test
void uploadStream_NullBlob_IllegalArgumentException() throws IOException {
try (InputStream stream = Files.newInputStream(Paths.get(testFilePath))) {
try (InputStream stream = Files.newInputStream(Path.of(testFilePath))) {
assertThrows(
IllegalArgumentException.class,
() -> azureStorageClient.uploadStream(stream, null));
Expand All @@ -252,7 +252,7 @@ void compressAndStream_NullStream_IllegalArgumentException() {

@Test
void compressAndStream_NullBlob_IllegalArgumentException() throws IOException {
try (InputStream stream = Files.newInputStream(Paths.get(testFilePath))) {
try (InputStream stream = Files.newInputStream(Path.of(testFilePath))) {
assertThrows(
IllegalArgumentException.class,
() -> azureStorageClient.compressAndUploadStream(stream, null));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import java.io.InputStreamReader;
import java.net.URISyntaxException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.Path;
import java.security.GeneralSecurityException;
import java.security.PrivateKey;
import java.security.cert.X509Certificate;
Expand Down Expand Up @@ -194,9 +194,9 @@ private static void createTableAndMapping() {
Assertions.fail("Failed to drop and create new table", ex);
}

resourcesPath = Paths.get(System.getProperty("user.dir"), "src", "test", "resources").toString();
resourcesPath = Path.of(System.getProperty("user.dir"), "src", "test", "resources").toString();
try {
String mappingAsString = new String(Files.readAllBytes(Paths.get(resourcesPath, "dataset_mapping.json")));
String mappingAsString = new String(Files.readAllBytes(Path.of(resourcesPath, "dataset_mapping.json")));
queryClient.executeToJsonResult(DB_NAME, String.format(".create table %s ingestion json mapping '%s' '%s'",
tableName, mappingReference, mappingAsString), null);
} catch (Exception ex) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import java.io.InputStream;
import java.net.URISyntaxException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.Path;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
Expand Down Expand Up @@ -70,7 +70,7 @@ class QueuedIngestClientTest {

@BeforeAll
static void setUp() throws Exception {
testFilePath = Paths.get("src", "test", "resources", "testdata.csv").toString();
testFilePath = Path.of("src", "test", "resources", "testdata.csv").toString();
when(resourceManagerMock.getShuffledContainers())
.thenReturn(Collections.singletonList(TestUtils.containerWithSasFromAccountNameAndContainerName(ACCOUNT_NAME, "someStorage")));
when(resourceManagerMock.getShuffledQueues())
Expand Down Expand Up @@ -222,7 +222,7 @@ void ingestFromFileAsync_FileDoesNotExist_IngestionClientException() {

@Test
void ingestFromStream_UploadStreamToBlobIsCalled() throws Exception {
InputStream stream = Files.newInputStream(Paths.get(testFilePath));
InputStream stream = Files.newInputStream(Path.of(testFilePath));
StreamSourceInfo streamSourceInfo = new StreamSourceInfo(stream, false);
try {
queuedIngestClient.ingestFromStream(streamSourceInfo, ingestionProperties);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
import java.net.URISyntaxException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.Path;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.util.stream.Stream;
Expand Down Expand Up @@ -329,7 +329,7 @@ void ingestFromFile_Csv() throws Exception {
void ingestFromFile_Json() throws Exception {
String path = resourcesDirectory + "testdata.json";
FileSourceInfo fileSourceInfo = new FileSourceInfo(path);
String contents = new String(Files.readAllBytes(Paths.get(path)), StandardCharsets.UTF_8).trim();
String contents = new String(Files.readAllBytes(Path.of(path)), StandardCharsets.UTF_8).trim();

ingestionProperties.setDataFormat(IngestionProperties.DataFormat.JSON);
ingestionProperties.setIngestionMapping("JsonMapping", IngestionMapping.IngestionMappingKind.JSON);
Expand Down
16 changes: 2 additions & 14 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
</developers>

<properties>
<revision>7.0.5</revision> <!-- CHANGE THIS to adjust project version-->
<revision>8.0.0</revision> <!-- CHANGE THIS to adjust project version-->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
<java.version>11</java.version>
<azure-bom-version>1.2.28</azure-bom-version>
<!-- Versions below are for several dependencies we're using in the data & ingest modules -->
<!-- Ideally, versions below should align with latest databricks runtime dependency versions -->
Expand Down Expand Up @@ -63,18 +63,6 @@
<mockito.version>5.11.0</mockito.version>
<jacoco.version>0.8.11</jacoco.version>
</properties>
<profiles>
<profile>
<!-- For java 8 this is the supported mockito version -->
<id>java8</id>
<activation>
<jdk>[1.8,11)</jdk>
</activation>
<properties>
<mockito.version>4.5.1</mockito.version>
</properties>
</profile>
</profiles>

<modules>
<module>ingest</module>
Expand Down
5 changes: 2 additions & 3 deletions quickstart/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

<properties>
<revision>7.0.5</revision> <!-- CHANGE THIS to match project version in the root (not technically parent) pom -->
<java.version>1.8</java.version>
<java.version>11</java.version>
<maven-jar-plugin.version>3.2.0</maven-jar-plugin.version>
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
<maven-assembly-plugin.version>3.3.0</maven-assembly-plugin.version>
Expand All @@ -49,8 +49,7 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<release>${java.version}</release>
</configuration>
</plugin>
<plugin>
Expand Down
3 changes: 1 addition & 2 deletions samples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<release>${java.version}</release>
</configuration>
</plugin>
</plugins>
Expand Down
Loading