GEODE-2612 Document new import data option

- gfsh import data man page updated
- import is used when changing a Lucene index, so point out how
to get the callback invoked to rebuild the index

This closes #637


Project: http://git-wip-us.apache.org/repos/asf/geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/geode/commit/950b9eb5
Tree: http://git-wip-us.apache.org/repos/asf/geode/tree/950b9eb5
Diff: http://git-wip-us.apache.org/repos/asf/geode/diff/950b9eb5

Branch: refs/heads/feature/GEM-1483
Commit: 950b9eb535842e748215b3acd89539bedb084460
Parents: e20873d
Author: Karen Miller <kmil...@pivotal.io>
Authored: Fri Jul 14 10:41:59 2017 -0700
Committer: Karen Miller <kmil...@pivotal.io>
Committed: Fri Jul 14 14:01:14 2017 -0700

----------------------------------------------------------------------
 .../gfsh/command-pages/import.html.md.erb          | 13 +++++++------
 .../tools_modules/lucene_integration.html.md.erb   | 17 ++++++++++++++++-
 2 files changed, 23 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/950b9eb5/geode-docs/tools_modules/gfsh/command-pages/import.html.md.erb
----------------------------------------------------------------------
diff --git a/geode-docs/tools_modules/gfsh/command-pages/import.html.md.erb 
b/geode-docs/tools_modules/gfsh/command-pages/import.html.md.erb
index f1bce75..464af25 100644
--- a/geode-docs/tools_modules/gfsh/command-pages/import.html.md.erb
+++ b/geode-docs/tools_modules/gfsh/command-pages/import.html.md.erb
@@ -40,16 +40,17 @@ Import user data from a file to a region.
 **Syntax:**
 
 ``` pre
- import data --region=value --file=value --member=value
+ import data --region=value --file=value --member=value 
[--invoke-callbacks=value]
 ```
 
 <a id="topic_jw2_2ld_2l__table_lzg_3fg_2w"></a>
 
-| Name                                           | Description                 
                                                                                
                                                                                
                                     |
-|------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| <span class="keyword parmname">\\-\\-region</span> | *Required.* Region into 
which data will be imported.                                                    
                                                                                
                                         |
-| <span class="keyword parmname">\\-\\-file </span>  | *Required.* File from 
which the imported data will be read. The file must have an extension of ".gfd" 
and must be on the file system of the member (or accessible to that member via 
NFS) that is being targeted for the import. |
-| <span class="keyword parmname">&#8209;&#8209;member</span> | *Required.* 
Name/Id of a member which hosts the region. The data will be imported from the 
specified file on the host where the member is running.                         
                                                      |
+| Name                                           | Description                 
                                                                                
                                                                                
                                     | Default Value |
+|------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----|
+| <span class="keyword parmname">\\-\\-region</span> | *Required.* Region into 
which data will be imported. | |
+| <span class="keyword parmname">\\-\\-file </span>  | *Required.* File from 
which the imported data will be read. The file must have an extension of ".gfd" 
and must be on the file system of the member (or accessible to that member via 
NFS) that is being targeted for the import. | |
+| <span class="keyword parmname">&#8209;&#8209;member</span> | *Required.* 
Name/ID of a member that hosts the region. The data will be imported from the 
specified file on the host where the member is running. | |
+| <span class="keyword parmname">&#8209;&#8209;invoke-callbacks</span> | 
Boolean value that, when true, invokes callbacks during the data import. |  
false |
 
 <span class="tablecap">Table 1. Import Data Parameters</span>
 

http://git-wip-us.apache.org/repos/asf/geode/blob/950b9eb5/geode-docs/tools_modules/lucene_integration.html.md.erb
----------------------------------------------------------------------
diff --git a/geode-docs/tools_modules/lucene_integration.html.md.erb 
b/geode-docs/tools_modules/lucene_integration.html.md.erb
index 77457b8..625d659 100644
--- a/geode-docs/tools_modules/lucene_integration.html.md.erb
+++ b/geode-docs/tools_modules/lucene_integration.html.md.erb
@@ -201,7 +201,22 @@ Implement these steps to change an index:
 5. Create a new region without the user-defined business logic callbacks
 6. Import the region data with the option to turn on callbacks. 
 The callbacks will be to invoke a Lucene async event listener to index
-the data.
+the data. The `gfsh import data` command will be of the form:
+
+    ``` pre
+    gfsh>import data --region=myReg --member=M3 --file=myReg.gfd 
--invoke-callbacks=true
+    ```
+If the API is used to import data, the code to set the option to
+invoke callbacks will be similar to this code fragment:
+
+    ``` pre
+    Region region = ...;
+    File snapshotFile = ...;
+    RegionSnapshotService service = region.getSnapshotService();
+    SnapshotOptions options = service.createOptions();
+    options.invokeCallbacks(true);
+    service.load(snapshotFile, SnapshotFormat.GEMFIRE, options);
+    ```
 7. Alter the region to add the user-defined business logic callbacks
 
 ## <a id="addl-gfsh-api" class="no-quick-link"></a>Additional Gfsh Commands

Reply via email to