Personal tools

Chronopolis:logformat: Difference between revisions

From Adapt

Jump to: navigation, search
No edit summary
No edit summary
 
Line 13: Line 13:
; operation-details (Optional): json object dependent on log-type
; operation-details (Optional): json object dependent on log-type


 
'''Example'''
<pre>
{
"provider": "CDL",
"collection": "state",
"version": "1.0"
"log-type": "COPY:1.0",
"result": "SUCCESS",
"item": "/data/county/aboutCollection.txt",
"session": 57692,
"timestamp": 1286286360,
operation-details:  {.....}
},
</pre>


=Log Types=
=Log Types=
Line 19: Line 32:


;Attributes
;Attributes
;type: type of session started (ie, replication)
;type: type of session started (ie, replication and class)


==SESSION_END:1.0==
==SESSION_END:1.0==


;No Attributes
==ERROR:1.0==
To be used for errors that affect an entire collection. Operation result should be fail.
;Attributes
;Attributes
;type: type of session started (ie, replication)
;errors: string list of errors that occurred
 
 


==COPY:1.0==
==COPY:1.0==
Line 32: Line 51:
;destination (Required): destination of file
;destination (Required): destination of file
;transport (Required): name of tool or protocol used for transfer
;transport (Required): name of tool or protocol used for transfer
;retry (Required): number of retries before successful or failed copy
;retry (Optionsl): number of retries before successful or failed copy (assume 1 if not present)
;error (Optional): JSON list of errors
;errors (Optional): JSON list of errors
;time (Optional): Time in ms that transfer took.
;time (Optional): Time in ms that transfer took.


Line 52: Line 71:
   "destination": "irods://chron-umiacs/home/srbChron-umiacs.umiacs/cdl/county/data/county/aboutCollection.txt",
   "destination": "irods://chron-umiacs/home/srbChron-umiacs.umiacs/cdl/county/data/county/aboutCollection.txt",
   "retry-attempts": 3
   "retry-attempts": 3
  "transport": "http-put"
  }
  }
}
}
</pre>
</pre>

Latest revision as of 17:00, 19 October 2010

Log Format

Chronopolis log files are lists of json events which follow the following spec.

provider (Required)
String name of data provider
collection (Required)
String name of collection
version (Required)
version number for required elements (1.0)
type (Required)
versioned description of log entry type (ie, COPY:1.0)
result (Required)
One of (SUCCESS,FAIL,INFORMATION)
timestamp (Required)
long, timestamp of log event
item (Optional)
String, relative path to item from collection root (Optional)
session (Optional)
long, session id if there are other log events w/in an action
operation-details (Optional)
json object dependent on log-type

Example

{ 
 "provider": "CDL", 
 "collection": "state",
 "version": "1.0"
 "log-type": "COPY:1.0",
 "result": "SUCCESS",
 "item": "/data/county/aboutCollection.txt",
 "session": 57692,
 "timestamp": 1286286360,
 operation-details:  {.....}
},

Log Types

SESSION_START:1.0

Attributes
type
type of session started (ie, replication and class)

SESSION_END:1.0

No Attributes

ERROR:1.0

To be used for errors that affect an entire collection. Operation result should be fail.

Attributes
errors
string list of errors that occurred


COPY:1.0

Version 1 of a copy event. This is should be used when either a transfer between chronopolis partners occur, or transfer from one media to another within a partner.

Attribtues
source (Required)
source url of file to be copied
destination (Required)
destination of file
transport (Required)
name of tool or protocol used for transfer
retry (Optionsl)
number of retries before successful or failed copy (assume 1 if not present)
errors (Optional)
JSON list of errors
time (Optional)
Time in ms that transfer took.

Example

{ 
 "provider": "CDL", 
 "collection": "state",
 "version": "1.0"
 "log-type": "COPY:1.0",
 "result": "SUCCESS",
 "item": "/data/county/aboutCollection.txt",
 "session": 57692,
 "timestamp": 1286286360,
 operation-details: 
 {
   "source": "srb://chron-umiacs/home/srbChron-umiacs.umiacs/cdl/county/data/county/aboutCollection.txt",
   "destination": "irods://chron-umiacs/home/srbChron-umiacs.umiacs/cdl/county/data/county/aboutCollection.txt",
   "retry-attempts": 3
   "transport": "http-put"
 }
}