Package org.apache.blur

Examples of org.apache.blur.BlurConfiguration


      }
    }), configuration);
  }

  public ZookeeperClusterStatus(ZooKeeper zooKeeper) throws IOException {
    this(zooKeeper, new BlurConfiguration());
  }
View Full Code Here


  public ZookeeperClusterStatus(ZooKeeper zooKeeper) throws IOException {
    this(zooKeeper, new BlurConfiguration());
  }

  public ZookeeperClusterStatus(String connectionStr) throws IOException {
    this(connectionStr, new BlurConfiguration());
  }
View Full Code Here

  public static void main(String[] args) throws Exception {
    int serverIndex = getServerIndex(args);
    LOG.info("Setting up Shard Server");
    Thread.setDefaultUncaughtExceptionHandler(new SimpleUncaughtExceptionHandler());
    BlurConfiguration configuration = new BlurConfiguration();
    printUlimits();
    ReporterSetup.setupReporters(configuration);
    MemoryReporter.enable();
    setupJvmMetrics();
    // make this configurable
View Full Code Here

  private static final Log LOG = LogFactory.getLog(ThriftBlurControllerServer.class);

  public static void main(String[] args) throws Exception {
    int serverIndex = getServerIndex(args);
    LOG.info("Setting up Controller Server");
    BlurConfiguration configuration = new BlurConfiguration();
    printUlimits();
    ReporterSetup.setupReporters(configuration);
    MemoryReporter.enable();
    setupJvmMetrics();
    ThriftServer server = createServer(serverIndex, configuration);
View Full Code Here

public class TraceTest {

  @Test
  public void testTrace() throws IOException {
    Trace.setStorage(new BaseTraceStorage(new BlurConfiguration()) {
      @Override
      public void store(TraceCollector collector) {
        assertEquals("test", collector.getId().getRootId());
        assertEquals(3, collector.getTraces().size());
      }
View Full Code Here

  }

  @Test
  public void testTraceThreadRunnable() throws InterruptedException, IOException {
    final AtomicLong count = new AtomicLong();
    Trace.setStorage(new BaseTraceStorage(new BlurConfiguration()) {
      @Override
      public void store(TraceCollector collector) {
        try {
          System.out.println(collector.toJsonObject());
        } catch (JSONException e) {
View Full Code Here

    tableDescriptor.setShardCount(1);
    tableDescriptor.putToTableProperties(BlurConstants.BLUR_SHARD_READ_INTERCEPTOR,
        IndexManagerTestReadInterceptor.class.getName());
    server = new LocalIndexServer(tableDescriptor, true);

    BlurFilterCache filterCache = new DefaultBlurFilterCache(new BlurConfiguration());
    long statusCleanupTimerDelay = 1000;
    indexManager = new IndexManager(server, getClusterStatus(tableDescriptor), filterCache, 10000000, 100, 1, 1,
        statusCleanupTimerDelay, 0, new DeepPagingCache());
    setupData();
  }
View Full Code Here

  @Test
  public void testMutationReplaceLargeRow() throws Exception {
    final String rowId = "largerow";
    indexManager.mutate(getLargeRow(rowId));
    TraceStorage oldReporter = Trace.getStorage();
    Trace.setStorage(new BaseTraceStorage(new BlurConfiguration()) {

      @Override
      public void close() throws IOException {

      }
View Full Code Here

  public static void main(String[] args) throws Exception {
    try {
      int serverIndex = getServerIndex(args);
      LOG.info("Setting up Controller Server");
      BlurConfiguration configuration = new BlurConfiguration();
      printUlimits();
      ReporterSetup.setupReporters(configuration);
      MemoryReporter.enable();
      setupJvmMetrics();
      ThriftServer server = createServer(serverIndex, configuration, false);
View Full Code Here

    if (tableContext != null) {
      return tableContext;
    }
    LOG.info("Creating table context for table [{0}]", name);
    Configuration configuration = getSystemConfiguration();
    BlurConfiguration blurConfiguration = getSystemBlurConfiguration();
    Map<String, String> tableProperties = tableDescriptor.getTableProperties();
    if (tableProperties != null) {
      for (Entry<String, String> prop : tableProperties.entrySet()) {
        configuration.set(prop.getKey(), prop.getValue());
        blurConfiguration.set(prop.getKey(), prop.getValue());
      }
    }

    tableContext = new TableContext();
    tableContext._configuration = configuration;
    tableContext._blurConfiguration = blurConfiguration;
    tableContext._tablePath = new Path(tableUri);
    tableContext._walTablePath = new Path(tableContext._tablePath, LOGS);

    tableContext._defaultFieldName = SUPER;
    tableContext._table = name;
    tableContext._descriptor = tableDescriptor;
    tableContext._timeBetweenCommits = configuration.getLong(BLUR_SHARD_TIME_BETWEEN_COMMITS, 60000);
    tableContext._timeBetweenRefreshs = configuration.getLong(BLUR_SHARD_TIME_BETWEEN_REFRESHS, 5000);
    tableContext._defaultPrimeDocTerm = new Term(BlurConstants.PRIME_DOC, BlurConstants.PRIME_DOC_VALUE);
    tableContext._defaultScoreType = ScoreType.SUPER;

    boolean strict = tableDescriptor.isStrictTypes();
    String defaultMissingFieldType = tableDescriptor.getDefaultMissingFieldType();
    boolean defaultMissingFieldLessIndexing = tableDescriptor.isDefaultMissingFieldLessIndexing();
    Map<String, String> defaultMissingFieldProps = emptyIfNull(tableDescriptor.getDefaultMissingFieldProps());

    Path storagePath = new Path(tableContext._tablePath, TYPES);
    try {
      HdfsFieldManager hdfsFieldManager = new HdfsFieldManager(SUPER, new NoStopWordStandardAnalyzer(), storagePath,
          configuration, strict, defaultMissingFieldType, defaultMissingFieldLessIndexing, defaultMissingFieldProps);
      loadCustomTypes(tableContext, blurConfiguration, hdfsFieldManager);
      hdfsFieldManager.loadFromStorage();
      tableContext._fieldManager = hdfsFieldManager;
    } catch (IOException e) {
      throw new RuntimeException(e);
    }

    Class<?> c1 = configuration.getClass(BLUR_SHARD_INDEX_DELETION_POLICY_MAXAGE,
        KeepOnlyLastCommitDeletionPolicy.class);
    tableContext._indexDeletionPolicy = (IndexDeletionPolicy) configure(ReflectionUtils.newInstance(c1, configuration),
        tableContext);
    Class<?> c2 = configuration.getClass(BLUR_SHARD_INDEX_SIMILARITY, FairSimilarity.class);
    tableContext._similarity = (Similarity) configure(ReflectionUtils.newInstance(c2, configuration), tableContext);

    String readInterceptorClass = blurConfiguration.get(BLUR_SHARD_READ_INTERCEPTOR);
    if (readInterceptorClass == null || readInterceptorClass.trim().isEmpty()) {
      tableContext._readInterceptor = DEFAULT_INTERCEPTOR;
    } else {
      try {
        @SuppressWarnings("unchecked")
View Full Code Here

TOP

Related Classes of org.apache.blur.BlurConfiguration

Copyright © 2018 www.massapicom. 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.