-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* remvoed maxConnectionsPerRoute some missing pieces * timeouts * timeouts * format + changelog * better * fix test * revert * revert * clean * format
- Loading branch information
Showing
12 changed files
with
109 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
data/src/main/java/com/microsoft/azure/kusto/data/exceptions/ExceptionUtils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.microsoft.azure.kusto.data.exceptions; | ||
|
||
import java.io.IOException; | ||
import java.io.UncheckedIOException; | ||
import java.net.URL; | ||
|
||
public class ExceptionUtils { | ||
public static DataServiceException createExceptionOnPost(Exception e, URL url, String kind) { | ||
boolean permanent = false; | ||
boolean isIO = false; | ||
if (e instanceof IOException) { | ||
isIO = true; | ||
} | ||
|
||
if (e instanceof UncheckedIOException) { | ||
e = ((UncheckedIOException) e).getCause(); | ||
isIO = true; | ||
} | ||
|
||
if (isIO) { | ||
return new IODataServiceException(url.toString(), (IOException) e, kind); | ||
|
||
} | ||
|
||
return new DataServiceException(url.toString(), String.format("Exception in %s post request: %s", kind, e.getMessage()), permanent); | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
data/src/main/java/com/microsoft/azure/kusto/data/exceptions/IODataServiceException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.microsoft.azure.kusto.data.exceptions; | ||
|
||
import com.microsoft.azure.kusto.data.Utils; | ||
|
||
import java.io.IOException; | ||
|
||
public class IODataServiceException extends DataServiceException { | ||
public IODataServiceException(String ingestionSource, IOException e, String kind) { | ||
super(ingestionSource, String.format("IOException in %s post request: %s", kind, e.getMessage()), | ||
e, | ||
!Utils.isRetriableIOException(e)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters