I think it depends on the underlying dataset.  I know Andy made some 
improvements to that endpoint so that it tries to unwrap to the underlying TDB2 
dataset to perform compaction on BUT this won't work for all possible datasets, 
especially non-trivial wrappers that potentially combine multiple datasets

Those endpoints are generic endpoints on the server rather than on the dataset 
hence why they allow being called with any dataset, even those not supported.

There has been some project discussion about moving to the opposite model for 
admin API structures e.g. /$/{dataset}/compact so you would only expose that 
endpoint on datasets that support it BUT there's been no work on this yet.

Rob

On 10/05/2021, 17:11, "Brandon Sara" 
<brandon.s...@collectivemedicaltech.com.INVALID> wrote:

    > Why is that?

    It would be most helpful if we had one single endpoint to manage a dataset, 
rather than two.


    > The HTTP operation ha to identify the database and DatasetGraphMapLink 
can have multiple, graphs from different databases.

    Thank you for this info, I hadn’t realized that you could combine graphs 
from different DBs for a service.


    > Compaction only works on TDB2 databases.

    While this makes sense. The wording of the documentation and of the 
endpoint itself leads one to believe that the dataset in general, regardless of 
the fact that the DB is “wrapped” by graph logic like inference, is all that is 
required for a dataset that is ultimately backed by a TDB2 db. For instance: 
`/$/compact/{dataset}` is the verbiage that is used for the endpoint. But in 
the config, I can set the “dataset” of my service to something that ultimately 
references a TDB2 DB. How is one to know that “dataset” in the compaction 
endpoint is not necessarily synonymous to “dataset” in the assembler config?


    > What sort of inference are you using?

    We are using normal OWL inference via the different supplied OWL reasoners 
and one service that uses the transitive reasoner.

    On May 8, 2021, at 3:17 AM, Andy Seaborne 
<a...@apache.org<mailto:a...@apache.org>> wrote:

    "EXTERNAL EMAIL" - This email originated from outside of the organization. 
Do not click or open attachments unless you recognize the sender and know the 
content is safe. If you are unsure, please contact CTS at 
hel...@pointclickcare.com<mailto:hel...@pointclickcare.com>.



    On 08/05/2021 00:05, Brandon Sara wrote:
    While I can see how this will work, it is a pretty undesirable solution.

    Why is that?

    Are there any other options? Or is there a way to get this working for a 
situation like this in the code?

    The HTTP operation ha to identify the database and DatasetGraphMapLink can 
have multiple, graphs from different databases.

    The type of configuration in the test is quite prevalent in the docs and 
examples. I would think that there should either be a disclaimer that 
compaction won’t work if the pattern is used or the code should be updated to 
work for the situation, no?

    Compaction only works on TDB2 databases.

    An inference service isn't a TDB2 database.

    What sort of inference are you using?

       Andy

    On May 7, 2021, at 3:28 PM, Andy Seaborne 
<a...@apache.org<mailto:a...@apache.org>> wrote:

    "EXTERNAL EMAIL" - This email originated from outside of the organization. 
Do not click or open attachments unless you recognize the sender and know the 
content is safe. If you are unsure, please contact CTS at 
hel...@pointclickcare.com<mailto:hel...@pointclickcare.com>.



    On 07/05/2021 20:44, Brandon Sara wrote:
    I’ve found what I believe is a bug. If you try to run compaction via the 
fuseki-main `/$/compact/{ds}` endpoint on an `ja:RDFDataset` that has a 
defaultGraph of `ja:InfModel`, compaction will not execute because the 
resulting `DatasetGraphMapLink` type does not inherit `DatasetGraphSwitchable` 
nor `DatasetGraphWrapper`. I am able to run compaction just fine with the 
command line tool on this dataset, it is just being restricted from running 
when a request comes through `ActionCompact`.

    Correct - while DatasetGraphWrapper might be possible, DatasetGraphMapLink 
is an independent ass

    There are many ways datasets can be build out of dataets and models.

    But you don't need to.

    You can have a service that exposes the dataset directly.

    # Service 1
    <#data> rdf:type fuseki:Service ;
       fuseki:name "withInference" ;
       fuseki:dataset <#inf-dataset> .

    <#inf-dataset>
     ....

    :tdbGraph rdf:type tdb2:GraphTDB2 ;
       tdb2:dataset <#storage> .

    # Service 2
    ## storage

    <#tdb> rdf:type fuseki:Service ;
       fuseki:name "storage" ;
       # No operations or endpoints.
       fuseki:dataset <#dataset> ;
    .

    <#storage>  rdf:type  tdb2:DatasetTDB2 ;
       tdb2:location "DB2"
       .

    then compact admin operations to
     http://localhost:3030/$/compact/storage

          Andy

    I have written a test that can be used to duplicate the issue: 
https://github.com/bsara/jena/blob/compact-with-inference/jena-fuseki2/jena-fuseki-main/src/test/java/org/apache/jena/fuseki/main/TestConfigFile.java#L300-L323
    I would try and fix the issue myself, but I know very little about the 
inner workings and intricacies of compaction, graph types, and how it all 
interacts.

    No PHI in Email: PointClickCare and Collective Medical, A PointClickCare 
Company, policies prohibit sending protected health information (PHI) by email, 
which may violate regulatory requirements. If sending PHI is necessary, please 
contact the sender for secure delivery instructions.
    Confidentiality Notice: This email message, including any attachments, is 
for the sole use of the intended recipient(s) and may contain confidential and 
privileged information. Any unauthorized review, use, disclosure or 
distribution is prohibited. If you are not the intended recipient, please 
contact the sender by reply email and destroy all copies of the original 
message.


    No PHI in Email: PointClickCare and Collective Medical, A PointClickCare 
Company, policies prohibit sending protected health information (PHI) by email, 
which may violate regulatory requirements. If sending PHI is necessary, please 
contact the sender for secure delivery instructions.

    Confidentiality Notice: This email message, including any attachments, is 
for the sole use of the intended recipient(s) and may contain confidential and 
privileged information. Any unauthorized review, use, disclosure or 
distribution is prohibited. If you are not the intended recipient, please 
contact the sender by reply email and destroy all copies of the original 
message.




Reply via email to