Changeset 5278


Ignore:
Timestamp:
2011-12-16 17:00:24 (17 months ago)
Author:
bruno
Message:

Forward-port the linkindex-query cli tool from 1.0.4.

Location:
trunk
Files:
17 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/cr/linkindex/src/main/java/org/lilyproject/linkindex/LinkIndex.java

    r5122 r5278  
    261261        try { 
    262262            Query query = new Query(); 
    263             query.addEqualsCondition("vtag", vtag.getBytes()); 
    264263            query.addEqualsCondition("target", record.toBytes()); 
     264            if (vtag != null) { 
     265                query.addEqualsCondition("vtag", vtag.getBytes()); 
     266            } 
    265267            if (sourceField != null) { 
    266268                query.addEqualsCondition("sourcefield", sourceField.getBytes()); 
     
    290292            Query query = new Query(); 
    291293            query.addEqualsCondition("target", record.toBytes()); 
    292             query.addEqualsCondition("vtag", vtag.getBytes()); 
     294            if (vtag != null) { 
     295                query.addEqualsCondition("vtag", vtag.getBytes()); 
     296            } 
    293297     
    294298            Set<FieldedLink> result = new HashSet<FieldedLink>(); 
     
    346350            Query query = new Query(); 
    347351            query.addEqualsCondition("source", record.toBytes()); 
    348             query.addEqualsCondition("vtag", vtag.getBytes()); 
     352            if (vtag != null) { 
     353                query.addEqualsCondition("vtag", vtag.getBytes()); 
     354            } 
    349355            if (sourceField != null) { 
    350356                query.addEqualsCondition("sourcefield", sourceField.getBytes()); 
     
    363369        } catch (IOException e) { 
    364370            throw new LinkIndexException("Error getting forward links for record '" + record + "', vtag '" + 
    365                     vtag + "'", e); 
     371                    vtag + "', field '" + sourceField + "'", e); 
    366372        } finally { 
    367373            metrics.report(Action.GET_FW_LINKS, System.currentTimeMillis() - before); 
     
    375381            Query query = new Query(); 
    376382            query.addEqualsCondition("source", record.toBytes()); 
    377             query.addEqualsCondition("vtag", vtag.getBytes()); 
     383            if (vtag != null) { 
     384                query.addEqualsCondition("vtag", vtag.getBytes()); 
     385            } 
    378386 
    379387            Set<FieldedLink> result = new HashSet<FieldedLink>(); 
     
    395403        } 
    396404    } 
     405 
    397406} 
  • trunk/cr/repository/api/src/main/java/org/lilyproject/repository/api/ValueType.java

    r5267 r5278  
    155155     *  
    156156     * <p> 
    157      * This method returns the deepest level (non List or Path) value type. 
     157     * This method returns the deepest level (non List or Path) value type, 
     158     * or the current value type if it is not a list or path. 
    158159     */ 
    159160    ValueType getDeepestValueType(); 
  • trunk/dist/dist-assembly.xml

    r5164 r5278  
    258258      <fileMode>0755</fileMode> 
    259259    </file> 
    260     <!--  
    261260    <file> 
    262261      <source>${basedir}/../tools/print-host/target/dist-scripts/lily-print-host.bat</source> 
     
    264263      <fileMode>0755</fileMode> 
    265264    </file> 
    266     --> 
    267265   
    268266    <!-- Lily schema upgrade tool for upgrade from Lily 1.0 to Lily 1.1 --> 
     
    291289      <fileMode>0755</fileMode> 
    292290    </file> 
    293     <!--file> 
     291    <file> 
    294292      <source>${basedir}/../tools/record-row-visualizer/target/dist-scripts/lily-record-row-visualizer.bat</source> 
    295293      <outputDirectory>/bin/</outputDirectory> 
    296294      <fileMode>0755</fileMode> 
    297     </file--> 
     295    </file> 
     296 
     297    <!-- Linkindex tool --> 
     298    <file> 
     299      <source>${basedir}/../apps/linkindex-cli/target/dist-scripts/lily-query-linkindex</source> 
     300      <outputDirectory>/bin/</outputDirectory> 
     301      <fileMode>0755</fileMode> 
     302    </file> 
     303    <file> 
     304      <source>${basedir}/../apps/linkindex-cli/target/dist-scripts/lily-query-linkindex.bat</source> 
     305      <outputDirectory>/bin/</outputDirectory> 
     306      <fileMode>0755</fileMode> 
     307    </file> 
    298308  </files> 
    299309 
  • trunk/dist/pom.xml

    r5247 r5278  
    113113      <artifactId>lily-record-row-visualizer</artifactId> 
    114114    </dependency> 
     115 
     116    <dependency> 
     117      <groupId>org.lilyproject</groupId> 
     118      <artifactId>lily-linkindex-cli</artifactId> 
     119    </dependency> 
    115120  </dependencies> 
    116121 
  • trunk/pom.xml

    r5270 r5278  
    119119    <module>apps/tester</module> 
    120120    <module>apps/mbox-import</module> 
     121    <module>apps/linkindex-cli</module> 
    121122 
    122123    <module>dist</module> 
     
    378379        <groupId>org.lilyproject</groupId> 
    379380        <artifactId>lily-record-row-visualizer</artifactId> 
     381        <version>1.2-SNAPSHOT</version> 
     382      </dependency> 
     383      <dependency> 
     384        <groupId>org.lilyproject</groupId> 
     385        <artifactId>lily-linkindex-cli</artifactId> 
    380386        <version>1.2-SNAPSHOT</version> 
    381387      </dependency> 
Note: See TracChangeset for help on using the changeset viewer.