2 Replies Latest reply on Feb 6, 2013 4:01 PM by MarkNoyes

    External Table : property name="oracle.kv.parentKey"


      Base on external table example in version 2.0.23, I have major key + minor key as follow:


      When I changed the property oracle.kv.parentKey in the config file to be full majorKey instead of one part of the major key, there is no results

      For example:

      when the value of this property is: /user (the default in the example) - I got all KV pairs starting with /user prefix

      but when I configure it to: /user/user9@example.com which is the full majorKey I didn't get answers at all (although the KV exists).

      Does this property support only first part of majorKey or may I misunderstand the concept?

      Thanks in advanced,
        • 1. Re: External Table : property name="oracle.kv.parentKey"
          Of course there is the property oracle.kv.subRange
          but I still wonder about the parentKey issue.
          • 2. Re: External Table : property name="oracle.kv.parentKey"
            Hi YosiK,

            The parentKey value in this context is treated the same as parentKey argument to the KVStore.storeIterator() methods. As described in the javadoc for those API calls:

            parentKey - the parent key whose "child" KV pairs are to be fetched. It may be null to fetch all keys in the store. If non-null, the major key path must be a partial path and the minor key path must be empty.

            So, in fact, the parentKey MUST NOT be a complete major key - it must be partial. There must be majorKey components following the parentKey that is specified. The subRange argument does interacts with this though. In the example, if you leave parentKey as "/user" but add a subRange parameter with value
            "I/user9@example.com/user9@example.com/I" you would achieve the result that I think you originally anticipated.

            - Mark