-
Notifications
You must be signed in to change notification settings - Fork 2
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
V3 fix storage-http compiler errors #379
base: v3
Are you sure you want to change the base?
Conversation
# Conflicts: # here-naksha-lib-model/src/commonMain/kotlin/naksha/model/IStorage.kt
# Conflicts: # here-naksha-lib-view/src/main/java/com/here/naksha/lib/view/View.java # here-naksha-lib-view/src/main/java/com/here/naksha/lib/view/ViewReadSession.java # here-naksha-lib-view/src/main/java/com/here/naksha/lib/view/ViewWriteSession.java # here-naksha-lib-view/src/main/java/com/here/naksha/lib/view/concurrent/LayerReadRequest.java # here-naksha-lib-view/src/main/java/com/here/naksha/lib/view/concurrent/LayerRequest.java # here-naksha-lib-view/src/main/java/com/here/naksha/lib/view/concurrent/ParallelQueryExecutor.java
# Conflicts: # here-naksha-lib-model/src/commonMain/kotlin/naksha/model/request/SuccessResponse.kt # here-naksha-lib-view/src/main/java/com/here/naksha/lib/view/LayerWriteFeatureRequest.java # here-naksha-lib-view/src/main/java/com/here/naksha/lib/view/ViewReadSession.java # here-naksha-lib-view/src/main/java/com/here/naksha/lib/view/ViewWriteSession.java # here-naksha-lib-view/src/main/java/com/here/naksha/lib/view/concurrent/ParallelQueryExecutor.java # here-naksha-lib-view/src/main/java/com/here/naksha/lib/view/missing/ObligatoryLayersResolver.java # here-naksha-lib-view/src/test/java/com/here/naksha/lib/view/MockReadSession.java # here-naksha-lib-view/src/test/java/com/here/naksha/lib/view/PsqlTests.java # here-naksha-lib-view/src/test/java/com/here/naksha/lib/view/PsqlViewTests.java # here-naksha-lib-view/src/test/java/com/here/naksha/lib/view/Sample.java # here-naksha-lib-view/src/test/java/com/here/naksha/lib/view/ViewTest.java # here-naksha-lib-view/src/test/java/com/here/naksha/lib/view/ViewWriteSessionTests.java # here-naksha-lib-view/src/test/java/com/here/naksha/lib/view/merge/MergeByStoragePriorityTest.java # here-naksha-lib-view/src/test/java/com/here/naksha/lib/view/missing/ObligatoryLayersResolverTest.java
# Conflicts: # here-naksha-storage-http/src/main/java/com/here/naksha/storage/http/HttpStorage.java # here-naksha-storage-http/src/main/java/com/here/naksha/storage/http/HttpStorageProperties.java # here-naksha-storage-http/src/main/java/com/here/naksha/storage/http/HttpStorageReadExecute.java # here-naksha-storage-http/src/main/java/com/here/naksha/storage/http/HttpStorageReadSession.java # here-naksha-storage-http/src/main/java/com/here/naksha/storage/http/PrepareResult.java
Code Coverage
Files
|
Code Coverage
Files
|
Code Coverage
Files
|
Code Coverage
Files
|
…rom another branch Signed-off-by: phmai <[email protected]>
Code Coverage
Files
|
@@ -51,31 +59,117 @@ public HttpStorage(@NotNull Storage storage) { | |||
properties.getSocketTimeout())); | |||
} | |||
|
|||
@Override | |||
public @NotNull IReadSession newReadSession(@Nullable NakshaContext context, boolean useMaster) { | |||
return new HttpStorageReadSession(context, useMaster, requestSender); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this method is no longer used in Handlers or Tasks it can be removed completely
@Override | ||
public void initStorage() { | ||
public IWriteSession newWriteSession(@Nullable SessionOptions options) { | ||
// TODO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Write session is not supported in HttpStorage, so there is no need for //TODO
It will be supported when the DataHub Connector HttpStorage is implemented, but it is not ready and I guess migrating it to v3 will be whole another task.
|
||
@Override | ||
public void close() { | ||
// TODO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see anything that should be closed or finalized inside HttpStorage.
So if there is no additional requirement from Naksha design to handle closure in some particular way, I think //TODO here is not needed
@Override | ||
public boolean isMasterConnect() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If isMasterConnect
is deleted there is no longer any usage of the useMaster
field.
So the field and all the parameters used only to set this field may be removed.
POp pOp = readRequest.getQueryParameter(PROPERTY_SEARCH_OP); | ||
return pOp == null ? "" : "&" + POpToQueryConverter.p0pToQuery(pOp); | ||
final IPropertyQuery propertyQuery = readRequest.getQuery().getProperties(); | ||
return propertyQuery == null ? "" : "&" + propertyQuery; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to test it with
ReadFeaturesByBBoxHttpStorageTest.tc800_testPropertySearch()
If the test passes that means that whole POp conversion and its test can be removed from HttpStorage
However I was not able to run the test due to compilation errors in AbstractEventHandler
and other classes
@@ -95,7 +95,6 @@ void testOneId() { | |||
TimeUnit.HOURS | |||
); | |||
|
|||
assertEquals(PROP_ID_1, PROP_ID_1_COPY); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand why this and the 127 line was deleted
@NotNull Map<String, String> defaultHeaders, | ||
long connectionTimeoutSec, | ||
long socketTimeoutSec) {} | ||
public static class KeyProperties { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why convert this record to a class?
If it is about being compared based on the contents, java records already override equals
method
https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Record.html#equals(java.lang.Object)
No description provided.