1 #include <ReducingHandler.h>
2 #include <ReducingPartsCountersStorage.h>
3 #include <ReducingOutputMessageBuilder.h>
4 #include <ConsoleSupportNotifier.h>
5 #include <ReducingExceptionsTranslator.h>
6 #include <SphinxTaskReducersManagerBuilder.h>
7 #include <PocoJSONReducingInputMessageConvertor.h>
8 #include <PocoJSONReducingOutputMessageConvertor.h>
10 using namespace HCE::reduce;
11 using namespace HCE::reduce_types;
12 using namespace HCE::reduce_convertors;
13 using namespace HCE::sphinx;
14 using namespace HCE::sphinx::reduce_task;
18 int main(
int argc,
char** argv)
22 SharedPtr<SphinxTaskReducersManagerIf<SphinxReduceJobBuilder<> > >sphinxTaskReducersManager = sphinxTaskReducersManagerBuilder.
build();
27 ReducingHandler<> reducingHandler(reducingPartsCountersStorage, sphinxTaskReducersManager, reducingOutputMessageBuilder, supportNotifier);
32 string sphinxResultJSON =
"";
33 string reducingResponseJSON =
"";
37 SharedPtr<ReducingInputMessage>reducingInputMessage;
38 SharedPtr<ReducingOutputMessage> reducingOutputMessage;
62 reducingOutputMessage = reducingHandler.
makeReducing(itemId);
67 reducingResponseJSON = pocoJSONReducingOutputMessageConvertor.
convertToJSONFrom(reducingOutputMessage);