{"action":"created","issue":{"url":"https://api.github.com/repos/ngageoint/geowave/issues/353","labels_url":"https://api.github.com/repos/ngageoint/geowave/issues/353/labels{/name}","comments_url":"https://api.github.com/repos/ngageoint/geowave/issues/353/comments","events_url":"https://api.github.com/repos/ngageoint/geowave/issues/353/events","html_url":"https://github.com/ngageoint/geowave/issues/353","id":71580503,"number":353,"title":"Import/Export capability","user":{"login":"chrisbennight","id":1864782,"avatar_url":"https://avatars.githubusercontent.com/u/1864782?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisbennight","html_url":"https://github.com/chrisbennight","followers_url":"https://api.github.com/users/chrisbennight/followers","following_url":"https://api.github.com/users/chrisbennight/following{/other_user}","gists_url":"https://api.github.com/users/chrisbennight/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisbennight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisbennight/subscriptions","organizations_url":"https://api.github.com/users/chrisbennight/orgs","repos_url":"https://api.github.com/users/chrisbennight/repos","events_url":"https://api.github.com/users/chrisbennight/events{/privacy}","received_events_url":"https://api.github.com/users/chrisbennight/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ngageoint/geowave/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/ngageoint/geowave/labels/new%20contributor","name":"new contributor","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-28T12:47:30Z","updated_at":"2015-05-14T15:22:21Z","closed_at":null,"body":"This capability might be part of geowave, or might be rolled as a separate project.\r\n\r\nThe base need is to provide the ability to export a geowave dataset (or subset of a dataset) to a single file, and import that same file back in to geowave.\r\n\r\nThe use case here is two-fold:\r\n  1. Provide a mechanism to backup geowave data sets\r\n    * This means by default (i.e. no additional arugments) an export -> import cycle should result in a data set that's functionally and semantically equivalent to the original\r\n  2. Provide a mechanism to snapshot data to simplify persistence format changes (between versions)\r\n    * This pushes a desire to make the serialization format somewhat independent from persistence formats where possible (it's a balance between duplicating code vs. duplicating dependencies).  With full re-use we loose the ability to make the serialization format independent of persistence changes (i.e. we could just export r-files).  \r\n\r\n  * Export Functionality\r\n    * Takes a geowave namespace as an input\r\n    * Exports (to HDFS) a serialized format of the dataset (single file) which contains (contains here means can be derived from)\r\n      * Feature type definition\r\n      * Original index definition\r\n      * Original namespace name\r\n      * Data values (including visibility)\r\n    * Stretch functionality (not required in initial version, might be moved to separate enhancement ticket)\r\n      * Ability to provide a CQL filter which subsets the data being exported\r\n  * Import Functionality\r\n    * Takes a serialized data file (single file) and imports it back into a geowave instance\r\n    * By default pulls namespace name, feature type definition, and index configuration from serialized file\r\n      * Allows user to optionally override namespace and index configuration\r\n    * Stretch functionality\r\n      * Allows user to override feature type \r\n        * Need to further specify functionality - how are feature types mappings expressed in this case?\r\n        * Merge capability (key off feature id?)\r\n  * Serialization Details\r\n    * File size is relevant\r\n    * Avro is what we have leveraged in other places for this, should use here unless there's a strong reason not to.\r\n    * Consider creating a feature collection concept so the feature names don't have to duplicated in every feature instance.\r\n    * Some structure required - we want to roll index definitions, feature definitions, etc. into a single file with all the features (don't want to deal with multiple files).\r\n    * One of the metadata fields should be a hash of the data collection\r\n      * Stretch goal: optional parity/ecc support\r\n    * Data adapters:  SimpleFeature support is what's immediately required, but some thought/design on handling other data adapters.  Might have a pluggable serialization capability that keys off the data adapter class?  (If we re-use the data adapter directly that might prevent us from using this capability to mitigate persistence changes)"},"comment":{"url":"https://api.github.com/repos/ngageoint/geowave/issues/comments/102070103","html_url":"https://github.com/ngageoint/geowave/issues/353#issuecomment-102070103","issue_url":"https://api.github.com/repos/ngageoint/geowave/issues/353","id":102070103,"user":{"login":"rwgdrummer","id":6342425,"avatar_url":"https://avatars.githubusercontent.com/u/6342425?v=3","gravatar_id":"","url":"https://api.github.com/users/rwgdrummer","html_url":"https://github.com/rwgdrummer","followers_url":"https://api.github.com/users/rwgdrummer/followers","following_url":"https://api.github.com/users/rwgdrummer/following{/other_user}","gists_url":"https://api.github.com/users/rwgdrummer/gists{/gist_id}","starred_url":"https://api.github.com/users/rwgdrummer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwgdrummer/subscriptions","organizations_url":"https://api.github.com/users/rwgdrummer/orgs","repos_url":"https://api.github.com/users/rwgdrummer/repos","events_url":"https://api.github.com/users/rwgdrummer/events{/privacy}","received_events_url":"https://api.github.com/users/rwgdrummer/received_events","type":"User","site_admin":false},"created_at":"2015-05-14T15:22:21Z","updated_at":"2015-05-14T15:22:21Z","body":"See #380.   The Avro Schema-Simple Feature Type construction is required in both tickets.\r\n\r\nThe only difference is in the serialization details:  (1) feature collection concept.  (2) Store the feature definitions, Avro schema, index into a separate meta-data file.\r\n\r\nKeep in mind this ticket is an GeoWave 'export' -> files in HDFS  -> 'import' to Geowave.\r\n\r\nImporting to GeoWave should be thought in general terms.  This means the the DataStore is not assumed to be Accumulo.  The DataStore of choice could be configured using SPI or some other property.   One way to deal with this is to make adaptations to the GeoWaveOutputFormat (which ingests into GeoWave).  I think this adaptation can be a separate ticket.\r\n\r\nThe key thing to keep in mind is the file contents should be GeoWave version agnostic. Class names and binary encoded images are not supported.  Hence, why Avro represents a good choice.     The schema describing the the data at rest in the file system may differ from the schema describing the data to be imported (attribute add/removed/rename etc.).  To support this idea, here is a story.\r\n\r\nA user wants to add a new feature attribute to feature data stored in GeoWave.  In addition, the user wants to use the latest GeoWave version.  However, the feature data adapter has changed , adding a new attribute to its serialized image.  The user uses the export tool to export there existing data along with the meta-data definitions using the older version of GeoWave.  The user defines the schema for the new feature type.  The user provides a transformation function to take features of the prior version to fill in the new attribute of the new version of data.  The GeoWave team has conveniently provided transformation function that transforms the feature data adapter meta-data to the new version of the adapter, providing a value for the added attribute to the feature data adapter.  Armed with the transformations, the user can exercise the import tool.  The import tool is run using the newer version of GeoWave.\r\n \r\nSome initial design artifacts can be:\r\n(1) The structure for the meta-data file.  Is this Avro as well?  If so, is it beast creating avro representation for data adapters and indices?  \r\n(2) The components of the import/ingest portion of the process.  For example, specification of the destination feature and the transformation function to be applied.  Transformation takes an object (e.g. Simple feature) from the stored format and transforms into another object (added/removed attributes, etc).   Recall there are two types of transformation: data and meta-data (adapters, indices, etc.).   \r\n\r\n"}}