GridSafeDocumentation/DataUpload/

Uploading Data

The easiest way to upload data is to use the CommandLine tools. e.g.

$ java -jar gridsafe-apps.jar -p database.properties UploadUsageRecord -t table-name -f data-file

Where table-name is the name of the table being loaded and data-file is the name of the file to be loaded. The format of the data file should match the parser class configured into the table.

It is also possible to add additional properties to every record being uploaded by adding these to the command-line.

$ java -jar gridsafe-apps.jar -p database.properties UploadUsageRecord -t table-name -f data-file MachineName=cluster.example.com

By default this command is used to upload accounting records using an AccountingUploadParser class. The mode property can be used to specify a different UploadParser class (for example to propulate a classifier table).

The same functionality is also available from the UploadServlet in the tomcat web-application so it is also possible to upload data by posting it to the /UploadServlet URL in the in the web application. This servlet needs to be enabled by setting the configuration parameter

service.feature.servlet.upload=true

Make sure that you configure tomcat/apache to restrict access to this URL if the servlet is enabled.

 

Grid-SAFE was funded by JISC and is maintained, developed, and managed by EPCC at the University of Edinburgh