Examples of FieldManager


Examples of org.apache.blur.analysis.FieldManager

    tableDescriptor.setName(name);
    tableDescriptor.setTableUri(file.toURI().toString());
    tableDescriptor.putToTableProperties(BlurConstants.BLUR_FIELDTYPE + "test", TestType.class.getName());

    TableContext context = TableContext.create(tableDescriptor);
    FieldManager fieldManager = context.getFieldManager();

    fieldManager.addColumnDefinition("fam", "col", null, false, "test", false, null);
  }
View Full Code Here

Examples of org.apache.blur.analysis.FieldManager

    TableDescriptor tableDescriptor = new TableDescriptor();
    tableDescriptor.setName(name);
    tableDescriptor.setTableUri(file.toURI().toString());

    TableContext context = TableContext.create(tableDescriptor);
    FieldManager fieldManager = context.getFieldManager();

    fieldManager.addColumnDefinition("fam", "col", null, false, "test", false, null);
  }
View Full Code Here

Examples of org.apache.blur.analysis.FieldManager

    if (columnDefinition == null) {
      throw new BException("ColumnDefinition cannot be null.");
    }
    TableDescriptor tableDescriptor = describe(table);
    TableContext context = TableContext.create(tableDescriptor);
    FieldManager fieldManager = context.getFieldManager();
    String family = columnDefinition.getFamily();
    if (family == null) {
      throw new BException("Family in ColumnDefinition [{0}] cannot be null.", columnDefinition);
    }
    String columnName = columnDefinition.getColumnName();
    if (columnName == null) {
      throw new BException("ColumnName in ColumnDefinition [{0}] cannot be null.", columnDefinition);
    }
    String subColumnName = columnDefinition.getSubColumnName();
    boolean fieldLessIndexed = columnDefinition.isFieldLessIndexed();
    String fieldType = columnDefinition.getFieldType();
    if (fieldType == null) {
      throw new BException("FieldType in ColumnDefinition [{0}] cannot be null.", columnDefinition);
    }
    boolean sortable = columnDefinition.isSortable();
    Map<String, String> props = columnDefinition.getProperties();
    try {
      return fieldManager.addColumnDefinition(family, columnName, subColumnName, fieldLessIndexed, fieldType, sortable,
          props);
    } catch (IOException e) {
      throw new BException(
          "Unknown error while trying to addColumnDefinition on table [{0}] with columnDefinition [{1}]", e, table,
          columnDefinition);
View Full Code Here

Examples of org.apache.blur.analysis.FieldManager

  @Override
  public Schema schema(String table) throws BlurException, TException {
    checkTable(table);
    try {
      TableContext tableContext = getTableContext(table);
      FieldManager fieldManager = tableContext.getFieldManager();
      fieldManager.loadFromStorage();
      Schema schema = new Schema().setTable(table);
      schema.setFamilies(new HashMap<String, Map<String, ColumnDefinition>>());
      Set<String> fieldNames = fieldManager.getFieldNames();
      INNER: for (String fieldName : fieldNames) {
        FieldTypeDefinition fieldTypeDefinition = fieldManager.getFieldTypeDefinition(fieldName);
        if (fieldTypeDefinition == null) {
          continue INNER;
        }
        String columnName = fieldTypeDefinition.getColumnName();
        String columnFamily = fieldTypeDefinition.getFamily();
View Full Code Here

Examples of org.apache.blur.analysis.FieldManager

    Schema schema = client.schema(tableName);
    Map<String, Map<String, ColumnDefinition>> families = schema.getFamilies();
    assertTrue(families.isEmpty());

    TableContext tableContext = TableContext.create(client.describe(tableName));
    FieldManager fieldManager = tableContext.getFieldManager();

    assertTrue(fieldManager.addColumnDefinition("test-family", "test-column", null, false, "string", false, null));

    TableContext.clear();
    Schema newschema = client.schema(tableName);
    Map<String, Map<String, ColumnDefinition>> newfamilies = newschema.getFamilies();
    assertTrue(!newfamilies.isEmpty());
View Full Code Here

Examples of org.apache.blur.analysis.FieldManager

      if (searcher == null) {
        // Was not pulled from cache, get a fresh one from the index.
        searcher = index.getIndexSearcher();
        usedCache = false;
      }
      FieldManager fieldManager = tableContext.getFieldManager();

      Query highlightQuery = getHighlightQuery(selector, table, fieldManager);

      fetchRow(searcher.getIndexReader(), table, shard, selector, fetchResult, highlightQuery, fieldManager,
          _maxHeapPerRowFetch, tableContext, filter);
View Full Code Here

Examples of org.apache.blur.analysis.FieldManager

      }
      Tracer trace = Trace.trace("query setup", Trace.param("table", table));
      ShardServerContext shardServerContext = ShardServerContext.getShardServerContext();
      ParallelCall<Entry<String, BlurIndex>, BlurResultIterable> call;
      TableContext context = getTableContext(table);
      FieldManager fieldManager = context.getFieldManager();
      org.apache.blur.thrift.generated.Query simpleQuery = blurQuery.query;
      ReadInterceptor interceptor = context.getReadInterceptor();
      Filter readFilter = interceptor.getFilter();
      if (rowId != null) {
        if (simpleQuery.recordFilter == null) {
View Full Code Here

Examples of org.apache.blur.analysis.FieldManager

  }

  public String parseQuery(String table, org.apache.blur.thrift.generated.Query simpleQuery) throws ParseException,
      BlurException {
    TableContext context = getTableContext(table);
    FieldManager fieldManager = context.getFieldManager();
    Filter preFilter = QueryParserUtil.parseFilter(table, simpleQuery.recordFilter, false, fieldManager, _filterCache,
        context);
    Filter postFilter = QueryParserUtil.parseFilter(table, simpleQuery.rowFilter, true, fieldManager, _filterCache,
        context);
    Query userQuery = QueryParserUtil.parseQuery(simpleQuery.query, simpleQuery.rowQuery, fieldManager, postFilter,
View Full Code Here

Examples of org.apache.openjpa.enhance.FieldManager

    /**
     * Helper method to provide the given field number to the given
     * field manager.
     */
    void provideField(PersistenceCapable pc, FieldManager store, int field) {
        FieldManager beforeFM = _fm;
        _fm = store;
        pc.pcProvideField(field);
        // Retaining original FM because of the possibility of reentrant calls
        _fm = beforeFM;
    }
View Full Code Here

Examples of org.apache.openjpa.enhance.FieldManager

    /**
     * Helper method to replace the given field number to the given
     * field manager.
     */
    void replaceField(PersistenceCapable pc, FieldManager load, int field) {
        FieldManager beforeFM = _fm;
        _fm = load;
        pc.pcReplaceField(field);
        // Retaining original FM because of the possibility of reentrant calls
        _fm = beforeFM;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.