Skip to content
This repository has been archived by the owner on Oct 30, 2020. It is now read-only.

Compilation fix for 'perf' subproject #39

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/src/docbkx/chap-administration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -226,15 +226,15 @@
<para>DiskFreeSpaceBytes, DiskIndexSizeBytes, LastOptimizationTime, LastDiskIndexModifiedTime, IndexDir, DiskIndexSegmentCount</para>
<programlisting><![CDATA[
(ObjectName: com.senseidb:zoie-name=zoie-admin-1-1 )
(InterfaceClassName: proj.zoie.mbean.ZoieSystemAdminMBean)
(InterfaceClassName: com.linkedin.zoie.mbean.ZoieSystemAdminMBean)
]]></programlisting>
</listitem>

<listitem>
<para>LastIndexingBatchSize, LastIndexingBatchDuration, LastIndexingEndTime</para>
<programlisting><![CDATA[
(ObjectName: com.senseidb:zoie-name=zoie-status-1-1 )
(InterfaceClassName: proj.zoie.mbean.ZoieIndexingStatusAdminMBean)
(InterfaceClassName: com.linkedin.zoie.mbean.ZoieIndexingStatusAdminMBean)
]]></programlisting>
</listitem>

Expand Down
8 changes: 4 additions & 4 deletions docs/src/docbkx/chap-configuration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ sensei.indexer.type=zoie

# sensei
# version comparator, default: ZoieConfig.DefaultVersionComparator
# sensei.version.comparator.class = proj.zoie.impl.indexing.ZoieConfig$DefaultVersionComparator
# sensei.version.comparator.class = com.linkedin.zoie.impl.indexing.ZoieConfig$DefaultVersionComparator

# extra services
sensei.plugin.services.list =
Expand Down Expand Up @@ -2479,7 +2479,7 @@ sensei.custom.facets.list= virtual_groupids, my.custom_facets.tags, groupid </p
</itemizedlist>

<para>This is the bean ID of the
<literal>proj.zoie.dataprovider.jms.TopicFactory</literal>
<literal>com.linkedin.zoie.dataprovider.jms.TopicFactory</literal>
object. This object is used to generate a topic object based on
the given topic name.</para>
</listitem>
Expand Down Expand Up @@ -2547,9 +2547,9 @@ sensei.custom.facets.list= virtual_groupids, my.custom_facets.tags, groupid </p
<para>This is the bean ID of the
<literal>com.sensei.indexing.api.jdbc.SenseiJDBCAdaptor</literal>
object. This object is used to build a
<literal>proj.zoie.dataprovider.jdbc.PreparedStatementBuilder</literal>
<literal>com.linkedin.zoie.dataprovider.jdbc.PreparedStatementBuilder</literal>
object, which is required by
<literal>proj.zoie.dataprovider.jdbc.JDBCStreamDataProvider</literal>.</para>
<literal>com.linkedin.zoie.dataprovider.jdbc.JDBCStreamDataProvider</literal>.</para>
</listitem>
</varlistentry>

Expand Down
10 changes: 5 additions & 5 deletions example/cars/conf/schema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@

<!--
valid types are:
simple - corresponds to com.browseengine.bobo.facets.impl.SimpleFacetHandler
path - corresponds to com.browseengine.bobo.facets.impl.PathFacetHandler
range - corresponds to com.browseengine.bobo.facets.impl.RangeFacetHandler
multi - corresponds to com.browseengine.bobo.facets.impl.MultiFacetHandler
compact-multi - corresponds to com.browseengine.bobo.facets.impl.CompactMultiFacetHandler
simple - corresponds to com.linkedin.bobo.facets.impl.SimpleFacetHandler
path - corresponds to com.linkedin.bobo.facets.impl.PathFacetHandler
range - corresponds to com.linkedin.bobo.facets.impl.RangeFacetHandler
multi - corresponds to com.linkedin.bobo.facets.impl.MultiFacetHandler
compact-multi - corresponds to com.linkedin.bobo.facets.impl.CompactMultiFacetHandler
custom - custom facet handler, name must be defined in a spring bean in custom-facets.xml
-->
<facets>
Expand Down
2 changes: 1 addition & 1 deletion example/cars/conf/sensei.properties
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ sensei.plugin.services.list=custom.plugins.spring
# the list of beans might be referenced both by simple name and the full prefix
#Sensei plugin factory returns the list of custom facets
custom.facets.spring.class=com.senseidb.conf.SpringSenseiPluginFactory
custom.facets.spring.returnedClass=com.browseengine.bobo.facets.FacetHandler, com.browseengine.bobo.facets.RuntimeFacetHandlerFactory
custom.facets.spring.returnedClass=com.linkedin.bobo.facets.FacetHandler, com.linkedin.bobo.facets.RuntimeFacetHandlerFactory
custom.facets.spring.springFile=custom-facets.xml
# the list of beans might be referenced both by simple name and the full prefix
sensei.custom.facets.list= custom.facets.spring
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import org.json.JSONObject;

import proj.zoie.impl.indexing.StreamDataProvider;
import com.linkedin.zoie.impl.indexing.StreamDataProvider;

import com.senseidb.gateway.SenseiGateway;
import com.senseidb.indexing.DataSourceFilter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
import org.apache.log4j.Logger;
import org.json.JSONObject;

import proj.zoie.api.DataConsumer.DataEvent;
import proj.zoie.impl.indexing.StreamDataProvider;
import com.linkedin.zoie.api.DataConsumer.DataEvent;
import com.linkedin.zoie.impl.indexing.StreamDataProvider;

public class TwitterSampleStreamer extends StreamDataProvider<JSONObject> {

Expand Down
8 changes: 0 additions & 8 deletions perf/perf-sensei-conf/plugins.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,4 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">

<bean id="perf-filter" class="com.sensei.perf.indexing.PerfJsonFilter">
<constructor-arg value="10000000" />
</bean>

<bean id="perf" class="com.sensei.perf.indexing.PerfStreamDataProviderBuilder">
<constructor-arg ref="perf-filter" />
</bean>
</beans>
10 changes: 5 additions & 5 deletions perf/perf-sensei-conf/schema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@

<!--
valid types are:
simple - corresponds to com.browseengine.bobo.facets.impl.SimpleFacetHandler
path - corresponds to com.browseengine.bobo.facets.impl.PathFacetHandler
range - corresponds to com.browseengine.bobo.facets.impl.RangeFacetHandler
multi - corresponds to com.browseengine.bobo.facets.impl.MultiFacetHandler
compact-multi - corresponds to com.browseengine.bobo.facets.impl.CompactMultiFacetHandler
simple - corresponds to com.linkedin.bobo.facets.impl.SimpleFacetHandler
path - corresponds to com.linkedin.bobo.facets.impl.PathFacetHandler
range - corresponds to com.linkedin.bobo.facets.impl.RangeFacetHandler
multi - corresponds to com.linkedin.bobo.facets.impl.MultiFacetHandler
compact-multi - corresponds to com.linkedin.bobo.facets.impl.CompactMultiFacetHandler
custom - custom facet handler, name must be defined in a spring bean in custom-facets.xml
-->
<facets>
Expand Down
9 changes: 6 additions & 3 deletions perf/perf-sensei-conf/sensei.properties
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,12 @@ sensei.index.freshness = 10000
# index manager parameters

sensei.index.manager.default.maxpartition.id = 1
sensei.index.manager.default.type = perf
sensei.index.manager.default.perf.file = data/cars.json
sensei.index.manager.default.perf.maxIter = 1000

sensei.gateway.class=com.sensei.perf.indexing.PerfStreamDataProviderBuilder
sensei.gateway.file = example/cars_perf/data/cars.json
sensei.gateway.maxIter = 1000
sensei.gateway.sleepMills = 100


# plugins: from plugins.xml

Expand Down
34 changes: 17 additions & 17 deletions perf/src/main/java/com/sensei/perf/indexing/PerfJsonFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@

import org.json.JSONObject;

import com.sensei.indexing.api.DataSourceFilter;
import com.senseidb.indexing.DataSourceFilter;

public class PerfJsonFilter extends DataSourceFilter<String> {

private final int _maxCount;
private int _count;
public PerfJsonFilter(int maxCount){
_maxCount = maxCount;
_count = 0;
}
@Override
protected JSONObject doFilter(String data) throws Exception {
JSONObject obj = new JSONObject(data);
long uid = _count % _maxCount;
obj.put("uid",uid);
_count++;
return obj;
}
private final int _maxCount;
private int _count;
public PerfJsonFilter(int maxCount){
_maxCount = maxCount;
_count = 0;
}
@Override
protected JSONObject doFilter(String data) throws Exception {
JSONObject obj = new JSONObject(data);
long uid = _count % _maxCount;
obj.put("uid",uid);
_count++;
return obj;
}
}
Loading