메뉴 건너뛰기

Bigdata, Semantic IoT, Hadoop, NoSQL

Bigdata, Hadoop ecosystem, Semantic IoT등의 프로젝트를 진행중에 습득한 내용을 정리하는 곳입니다.
필요한 분을 위해서 공개하고 있습니다. 문의사항은 gooper@gooper.com로 메일을 보내주세요.


# Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0

## A collection of example configurations for Fuseki

@prefix :        <#> .
@prefix fuseki:  <http://jena.apache.org/fuseki#> .
@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

@prefix rdfs:   <http://www.w3.org/2000/01/rdf-schema#> .
@prefix tdb:     <http://jena.hpl.hp.com/2008/tdb#> .
@prefix ja:      <http://jena.hpl.hp.com/2005/11/Assembler#> .

[] rdf:type fuseki:Server ;
   # Timeout - server-wide default: milliseconds.
   # Format 1: "1000" -- 1 second timeout
   # Format 2: "10000,60000" -- 10s timeout to first result, then 60s timeout to for rest of query.
   # See java doc for ARQ.queryTimeout
   # ja:context [ ja:cxtName "arq:queryTimeout" ;  ja:cxtValue "10000" ] ;

   # ja:loadClass "your.code.Class" ;

   fuseki:services (
     <#service1>
     <#service2>
     <#service3>
   ) .

# Custom code.
[] ja:loadClass "com.hp.hpl.jena.tdb.TDB" .

# TDB
tdb:DatasetTDB  rdfs:subClassOf  ja:RDFDataset .
tdb:GraphTDB    rdfs:subClassOf  ja:Model .

## ---------------------------------------------------------------
## Updatable in-memory dataset.

<#service1> rdf:type fuseki:Service ;
    # URI of the dataset -- http://host:port/ds
    fuseki:name                     "ds" ;

    # SPARQL query services e.g. http://host:port/ds/sparql?query=...
    fuseki:serviceQuery             "sparql" ;
    fuseki:serviceQuery             "query" ;
    # SPARQL Update service -- http://host:port/ds/update?request=...
    fuseki:serviceUpdate            "update" ;   # SPARQL query service -- /ds/update

    # Upload service -- http://host:port/ds/upload?graph=default or ?graph=URI or ?default
    # followed by a multipart body, each part being RDF syntax.
    # Syntax determined by the file name extension.
    fuseki:serviceUpload            "upload" ;   # Non-SPARQL upload service

    # SPARQL Graph store protocol (read and write)
    # GET, PUT, POST DELETE to http://host:port/ds/data?graph= or ?default=
    fuseki:serviceReadWriteGraphStore      "data" ;    

    # A separate read-only graph store endpoint:
    fuseki:serviceReadGraphStore       "get" ;   # Graph store protocol (read only) -- /ds/get

    fuseki:dataset           <#emptyDataset> ;
    .

## In-memory, initially empty.
<#emptyDataset> rdf:type ja:RDFDataset .

## ---------------------------------------------------------------
## Read-only access to a small books database.

<#service2> rdf:type fuseki:Service ;
    fuseki:name                     "books" ;    # http://host:port/books
    fuseki:serviceQuery             "query" ;    # SPARQL query service
    fuseki:serviceReadGraphStore    "get" ;      # SPARQL Graph store protocol (read only)
    fuseki:dataset                   <#books> ;
    # Configuration
    .
   
<#books>    rdf:type ja:RDFDataset ;
    rdfs:label "Books" ;
    ja:defaultGraph
      [ rdfs:label "books.ttl" ;
        a ja:MemoryModel ;
        ja:content [ja:externalContent <file:Data/books.ttl> ] ;
      ] ;
    .
## ---------------------------------------------------------------
## TDB dataset with only SPARQL query.

<#service3>  rdf:type fuseki:Service ;
    fuseki:name              "inf" ;             # http://host/inf
    fuseki:serviceQuery      "sparql" ;          # SPARQL query service
    fuseki:dataset           <#dataset> ;
    .

<#dataset> rdf:type       ja:RDFDataset ;
    ja:defaultGraph       <#model_inf_2> ;
     .

# ---- RDFS Inference models
# Thiese must be incorporate in a dataset in order to use them.
# All in one file.

<#model_inf_1> rdfs:label "Inf-1" ;
    ja:baseModel
        [ a ja:MemoryModel ;
          ja:content [ja:externalContent <file:Data/test_data_rdfs.ttl>] ;
        ] ;
    ja:reasoner
         [ ja:reasonerURL <http://jena.hpl.hp.com/2003/RDFSExptRuleReasoner> ]
    .

# Separate ABox and TBox

<#model_inf_2> rdfs:label "Inf-2" ;
    ja:baseModel
        [ a ja:MemoryModel ;
          ja:content [ja:externalContent <file:Data/test_abox.ttl>] ;
          ja:content [ja:externalContent <file:Data/test_tbox.ttl>] ;
        ] ;
    ja:reasoner
         [ ja:reasonerURL <http://jena.hpl.hp.com/2003/RDFSExptRuleReasoner> ]
    .

번호 제목 글쓴이 날짜 조회 수
13 fuseki에서 제공하는 script중 s-post를 사용하는 예문 총관리자 2017.09.15 31
12 jena/fuseki 3.4.0 설치 총관리자 2017.07.25 170
» fuseki용 config-examples.ttl 예시 내용 총관리자 2017.05.17 646
10 fuseki webUI를 통해서 전체 카운트를 하면 급격하게 메모리를 소모해 버리는 문제가 있음 file 총관리자 2017.04.28 162
9 update를 많이 하면 heap memory가 많이 소진되고 최종적으로 OOM가 발생하는데 이에 대한 설명 총관리자 2017.04.10 717
8 fuseki가 제공하는 web ui를 통해서 dataset를 remove->create할 경우 동일한 동일한 이름으로 지정했을때 fuseki-server.jar가 뜨지 않는 현상 총관리자 2017.02.03 54
7 jena의 data폴더를 hadoop nfs를 이용하여 HDFS상의 폴더에 마운트 시키고 fuseki를 통하여 inert를 시도했을때 transaction 오류 발생 총관리자 2016.12.02 82
6 Jena 2.3를 Hadoop 2.7.2의 NFS로 mount하고 fuseki를 이용하여 start할때 오류 메세지 총관리자 2016.12.02 1557
5 동시에 많은 요청이 endpoint로 몰려서java.net.NoRouteToHostException가 발생하는 경우의 처리방법 총관리자 2016.10.17 506
4 jena jar파일실행시 org.apache.jena.tdb.TDB.init에서 java.lang.NullPointerException발생시 조치사항 총관리자 2016.08.19 134
3 Jena는 기본적으로 multi thread환경을 지원하지 않는다. 총관리자 2016.08.16 94
2 [Elephas] Jena Elephas를 이용하여 Spark에서 rdfTriples의 RDD를 만들고 RDD관련 작업하는 샘플소스 총관리자 2016.08.10 90
1 select와 group by결과 값이 없는경우의 리턴 값이 다름 file 총관리자 2016.02.05 119

A personal place to organize information learned during the development of such Hadoop, Hive, Hbase, Semantic IoT, etc.
We are open to the required minutes. Please send inquiries to gooper@gooper.com.

위로