target
stringlengths
20
113k
src_fm
stringlengths
11
86.3k
src_fm_fc
stringlengths
21
86.4k
src_fm_fc_co
stringlengths
30
86.4k
src_fm_fc_ms
stringlengths
42
86.8k
src_fm_fc_ms_ff
stringlengths
43
86.8k
@Test public void getPipelineBranchTest() throws ApiException { String organization = null; String pipeline = null; String branch = null; BranchImpl response = api.getPipelineBranch(organization, pipeline, branch); }
public BranchImpl getPipelineBranch(String organization, String pipeline, String branch) throws ApiException { ApiResponse<BranchImpl> resp = getPipelineBranchWithHttpInfo(organization, pipeline, branch); return resp.getData(); }
BlueOceanApi { public BranchImpl getPipelineBranch(String organization, String pipeline, String branch) throws ApiException { ApiResponse<BranchImpl> resp = getPipelineBranchWithHttpInfo(organization, pipeline, branch); return resp.getData(); } }
BlueOceanApi { public BranchImpl getPipelineBranch(String organization, String pipeline, String branch) throws ApiException { ApiResponse<BranchImpl> resp = getPipelineBranchWithHttpInfo(organization, pipeline, branch); return resp.getData(); } BlueOceanApi(); BlueOceanApi(ApiClient apiClient); }
BlueOceanApi { public BranchImpl getPipelineBranch(String organization, String pipeline, String branch) throws ApiException { ApiResponse<BranchImpl> resp = getPipelineBranchWithHttpInfo(organization, pipeline, branch); return resp.getData(); } BlueOceanApi(); BlueOceanApi(ApiClient apiClient); ApiClient getApiClient(...
BlueOceanApi { public BranchImpl getPipelineBranch(String organization, String pipeline, String branch) throws ApiException { ApiResponse<BranchImpl> resp = getPipelineBranchWithHttpInfo(organization, pipeline, branch); return resp.getData(); } BlueOceanApi(); BlueOceanApi(ApiClient apiClient); ApiClient getApiClient(...
@Test public void testLoadXML() throws Exception { XmlModelLoader loader = new XmlModelLoader(); File file = new File("conf/test/xml/sample.xml"); XmlModel model = loader.loadModel(new FileInputStream(file)); Assert.assertNotNull(model); Assert.assertEquals(1, model.getDocuments().size()); Document doc = model.getDocum...
@Override public XmlModel loadModel(InputStream xmlStream) throws ModelException { if (xmlStream == null) { throw new ModelException("XML model is not valid [null]."); } try { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder db = dbf.newDocumentBuilder(); Document doc = db.parse(xmlStr...
XmlModelLoader extends ModelLoader<XmlModel, InputStream> { @Override public XmlModel loadModel(InputStream xmlStream) throws ModelException { if (xmlStream == null) { throw new ModelException("XML model is not valid [null]."); } try { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder d...
XmlModelLoader extends ModelLoader<XmlModel, InputStream> { @Override public XmlModel loadModel(InputStream xmlStream) throws ModelException { if (xmlStream == null) { throw new ModelException("XML model is not valid [null]."); } try { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder d...
XmlModelLoader extends ModelLoader<XmlModel, InputStream> { @Override public XmlModel loadModel(InputStream xmlStream) throws ModelException { if (xmlStream == null) { throw new ModelException("XML model is not valid [null]."); } try { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder d...
XmlModelLoader extends ModelLoader<XmlModel, InputStream> { @Override public XmlModel loadModel(InputStream xmlStream) throws ModelException { if (xmlStream == null) { throw new ModelException("XML model is not valid [null]."); } try { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder d...
@Test public void testLoadModel() throws ModelException { UmlModelLoader loader = new UmlModelLoader(); UmlModel umlModel = loader.loadModel(new File("conf/template/uml/sample.uml")); Assert.assertNotNull(umlModel); Assert.assertNotNull(umlModel.getModel()); Assert.assertSame(ModelImpl.class, umlModel.getModel().getCla...
@Override public UmlModel loadModel(File modelFile) throws UmlModelException { if (modelFile == null) { return new UmlModel(UmlModelProducer.getInstance().createUmlModel(null)); } try { Model model = getUmlRootModel(modelFile); UmlModel umlModel = new UmlModel(model); return umlModel; } catch (IOException e) { logger.e...
UmlModelLoader extends ModelLoader<UmlModel, File> { @Override public UmlModel loadModel(File modelFile) throws UmlModelException { if (modelFile == null) { return new UmlModel(UmlModelProducer.getInstance().createUmlModel(null)); } try { Model model = getUmlRootModel(modelFile); UmlModel umlModel = new UmlModel(model)...
UmlModelLoader extends ModelLoader<UmlModel, File> { @Override public UmlModel loadModel(File modelFile) throws UmlModelException { if (modelFile == null) { return new UmlModel(UmlModelProducer.getInstance().createUmlModel(null)); } try { Model model = getUmlRootModel(modelFile); UmlModel umlModel = new UmlModel(model)...
UmlModelLoader extends ModelLoader<UmlModel, File> { @Override public UmlModel loadModel(File modelFile) throws UmlModelException { if (modelFile == null) { return new UmlModel(UmlModelProducer.getInstance().createUmlModel(null)); } try { Model model = getUmlRootModel(modelFile); UmlModel umlModel = new UmlModel(model)...
UmlModelLoader extends ModelLoader<UmlModel, File> { @Override public UmlModel loadModel(File modelFile) throws UmlModelException { if (modelFile == null) { return new UmlModel(UmlModelProducer.getInstance().createUmlModel(null)); } try { Model model = getUmlRootModel(modelFile); UmlModel umlModel = new UmlModel(model)...
@Test public void receive() throws Exception { receiverService.receive(new ProbeJson()); Thread.sleep(1000); System.out.println(ConcurrentDataList.instance().getAll().size()); }
@Override public void receive(ProbeJson probeJson) { concurrentDataList.addProbeJson(probeJson); }
ReceiverServiceImpl implements ReceiverService { @Override public void receive(ProbeJson probeJson) { concurrentDataList.addProbeJson(probeJson); } }
ReceiverServiceImpl implements ReceiverService { @Override public void receive(ProbeJson probeJson) { concurrentDataList.addProbeJson(probeJson); } }
ReceiverServiceImpl implements ReceiverService { @Override public void receive(ProbeJson probeJson) { concurrentDataList.addProbeJson(probeJson); } @Override void receive(ProbeJson probeJson); @Override @Scheduled(cron = "0 0/20 7-23 * * ?") void commit(); @Override RealTimeJson statLatest(); }
ReceiverServiceImpl implements ReceiverService { @Override public void receive(ProbeJson probeJson) { concurrentDataList.addProbeJson(probeJson); } @Override void receive(ProbeJson probeJson); @Override @Scheduled(cron = "0 0/20 7-23 * * ?") void commit(); @Override RealTimeJson statLatest(); }
@Test @Rollback @Transactional public void save() throws Exception { }
@Override public UserEntity save(UserEntity userEntity) { return userRepository.save(userEntity); }
UserDaoImpl implements UserDao { @Override public UserEntity save(UserEntity userEntity) { return userRepository.save(userEntity); } }
UserDaoImpl implements UserDao { @Override public UserEntity save(UserEntity userEntity) { return userRepository.save(userEntity); } }
UserDaoImpl implements UserDao { @Override public UserEntity save(UserEntity userEntity) { return userRepository.save(userEntity); } @Override UserEntity findById(int id); @Override UserEntity findByName(String name); @Override UserEntity findByNameAndPassword(String name, String password); @Override UserEntity save(U...
UserDaoImpl implements UserDao { @Override public UserEntity save(UserEntity userEntity) { return userRepository.save(userEntity); } @Override UserEntity findById(int id); @Override UserEntity findByName(String name); @Override UserEntity findByNameAndPassword(String name, String password); @Override UserEntity save(U...
@Test public void delete() throws Exception { }
@Override public void delete(int id) { userRepository.delete(id); }
UserDaoImpl implements UserDao { @Override public void delete(int id) { userRepository.delete(id); } }
UserDaoImpl implements UserDao { @Override public void delete(int id) { userRepository.delete(id); } }
UserDaoImpl implements UserDao { @Override public void delete(int id) { userRepository.delete(id); } @Override UserEntity findById(int id); @Override UserEntity findByName(String name); @Override UserEntity findByNameAndPassword(String name, String password); @Override UserEntity save(UserEntity userEntity); @Override...
UserDaoImpl implements UserDao { @Override public void delete(int id) { userRepository.delete(id); } @Override UserEntity findById(int id); @Override UserEntity findByName(String name); @Override UserEntity findByNameAndPassword(String name, String password); @Override UserEntity save(UserEntity userEntity); @Override...
@Test public void getNewOldStat() throws Exception { System.out.println(newOldService .getNewOldStat((int)(System.currentTimeMillis()/(3600*1000)-1), QueryThreshold.HOUR,10,null)); }
@Override public List<NewOldVo> getNewOldStat(int startHour, QueryThreshold threshold, int startRange, String probeId) throws ParamException { if (threshold==null) throw new ParamException(ServerCode.PARAM_FORMAT,"threshold","threshold cannot be null"); return newOldDao.getNewOldStat(startHour, threshold, startRange, p...
NewOldServiceImpl implements NewOldService { @Override public List<NewOldVo> getNewOldStat(int startHour, QueryThreshold threshold, int startRange, String probeId) throws ParamException { if (threshold==null) throw new ParamException(ServerCode.PARAM_FORMAT,"threshold","threshold cannot be null"); return newOldDao.getN...
NewOldServiceImpl implements NewOldService { @Override public List<NewOldVo> getNewOldStat(int startHour, QueryThreshold threshold, int startRange, String probeId) throws ParamException { if (threshold==null) throw new ParamException(ServerCode.PARAM_FORMAT,"threshold","threshold cannot be null"); return newOldDao.getN...
NewOldServiceImpl implements NewOldService { @Override public List<NewOldVo> getNewOldStat(int startHour, QueryThreshold threshold, int startRange, String probeId) throws ParamException { if (threshold==null) throw new ParamException(ServerCode.PARAM_FORMAT,"threshold","threshold cannot be null"); return newOldDao.getN...
NewOldServiceImpl implements NewOldService { @Override public List<NewOldVo> getNewOldStat(int startHour, QueryThreshold threshold, int startRange, String probeId) throws ParamException { if (threshold==null) throw new ParamException(ServerCode.PARAM_FORMAT,"threshold","threshold cannot be null"); return newOldDao.getN...
@Test public void findByHourAndProbe() throws Exception { }
@Override public List<Tuple<String, Number>> findByHourAndProbe(int hour, String probeId) { return ObjectMapper.convertToChartData(newOldDao.findByHourAndProbe(hour, probeId)); }
NewOldServiceImpl implements NewOldService { @Override public List<Tuple<String, Number>> findByHourAndProbe(int hour, String probeId) { return ObjectMapper.convertToChartData(newOldDao.findByHourAndProbe(hour, probeId)); } }
NewOldServiceImpl implements NewOldService { @Override public List<Tuple<String, Number>> findByHourAndProbe(int hour, String probeId) { return ObjectMapper.convertToChartData(newOldDao.findByHourAndProbe(hour, probeId)); } }
NewOldServiceImpl implements NewOldService { @Override public List<Tuple<String, Number>> findByHourAndProbe(int hour, String probeId) { return ObjectMapper.convertToChartData(newOldDao.findByHourAndProbe(hour, probeId)); } @Override List<NewOldVo> getNewOldStat(int startHour, QueryThreshold threshold, int startRange,...
NewOldServiceImpl implements NewOldService { @Override public List<Tuple<String, Number>> findByHourAndProbe(int hour, String probeId) { return ObjectMapper.convertToChartData(newOldDao.findByHourAndProbe(hour, probeId)); } @Override List<NewOldVo> getNewOldStat(int startHour, QueryThreshold threshold, int startRange,...
@Test public void findById() throws Exception { }
@Override public NewOldVo findById(int id) throws ServerException { NewOldEntity entity = newOldDao.findById(id); if (entity == null) throw new ServerException(ServerCode.NOT_FOUND); return new NewOldVo(entity); }
NewOldServiceImpl implements NewOldService { @Override public NewOldVo findById(int id) throws ServerException { NewOldEntity entity = newOldDao.findById(id); if (entity == null) throw new ServerException(ServerCode.NOT_FOUND); return new NewOldVo(entity); } }
NewOldServiceImpl implements NewOldService { @Override public NewOldVo findById(int id) throws ServerException { NewOldEntity entity = newOldDao.findById(id); if (entity == null) throw new ServerException(ServerCode.NOT_FOUND); return new NewOldVo(entity); } }
NewOldServiceImpl implements NewOldService { @Override public NewOldVo findById(int id) throws ServerException { NewOldEntity entity = newOldDao.findById(id); if (entity == null) throw new ServerException(ServerCode.NOT_FOUND); return new NewOldVo(entity); } @Override List<NewOldVo> getNewOldStat(int startHour, QueryT...
NewOldServiceImpl implements NewOldService { @Override public NewOldVo findById(int id) throws ServerException { NewOldEntity entity = newOldDao.findById(id); if (entity == null) throw new ServerException(ServerCode.NOT_FOUND); return new NewOldVo(entity); } @Override List<NewOldVo> getNewOldStat(int startHour, QueryT...
@Test public void save() throws Exception { }
@Override public NewOldVo save(NewOldCustomElement newOldCustomElement) { NewOldEntity entity = new NewOldEntity(); entity.setWifiProb(newOldCustomElement.getWifiProb()); entity.setHour(new Timestamp(newOldCustomElement.getHour()*3600*1000)); entity.setNewCustomer(newOldCustomElement.getNewCustomer()); entity.setOldCus...
NewOldServiceImpl implements NewOldService { @Override public NewOldVo save(NewOldCustomElement newOldCustomElement) { NewOldEntity entity = new NewOldEntity(); entity.setWifiProb(newOldCustomElement.getWifiProb()); entity.setHour(new Timestamp(newOldCustomElement.getHour()*3600*1000)); entity.setNewCustomer(newOldCust...
NewOldServiceImpl implements NewOldService { @Override public NewOldVo save(NewOldCustomElement newOldCustomElement) { NewOldEntity entity = new NewOldEntity(); entity.setWifiProb(newOldCustomElement.getWifiProb()); entity.setHour(new Timestamp(newOldCustomElement.getHour()*3600*1000)); entity.setNewCustomer(newOldCust...
NewOldServiceImpl implements NewOldService { @Override public NewOldVo save(NewOldCustomElement newOldCustomElement) { NewOldEntity entity = new NewOldEntity(); entity.setWifiProb(newOldCustomElement.getWifiProb()); entity.setHour(new Timestamp(newOldCustomElement.getHour()*3600*1000)); entity.setNewCustomer(newOldCust...
NewOldServiceImpl implements NewOldService { @Override public NewOldVo save(NewOldCustomElement newOldCustomElement) { NewOldEntity entity = new NewOldEntity(); entity.setWifiProb(newOldCustomElement.getWifiProb()); entity.setHour(new Timestamp(newOldCustomElement.getHour()*3600*1000)); entity.setNewCustomer(newOldCust...
@Test public void login() throws Exception { System.out.println(userService.login("admin","admin")); try { userService.login("admin","ha"); fail(); } catch (ServerException e) { System.out.println(e.getMessage()); } }
@Override public UserVo login(String username, String password) throws ServerException { UserEntity userEntity = userDao.findByName(username); if (userEntity==null) throw new ServerException(ServerCode.USER_NOT_FOUND); if (!userEntity.getPassword().equals(password)) throw new ServerException(ServerCode.ERROR_PASSWORD);...
UserServiceImpl implements UserService { @Override public UserVo login(String username, String password) throws ServerException { UserEntity userEntity = userDao.findByName(username); if (userEntity==null) throw new ServerException(ServerCode.USER_NOT_FOUND); if (!userEntity.getPassword().equals(password)) throw new Se...
UserServiceImpl implements UserService { @Override public UserVo login(String username, String password) throws ServerException { UserEntity userEntity = userDao.findByName(username); if (userEntity==null) throw new ServerException(ServerCode.USER_NOT_FOUND); if (!userEntity.getPassword().equals(password)) throw new Se...
UserServiceImpl implements UserService { @Override public UserVo login(String username, String password) throws ServerException { UserEntity userEntity = userDao.findByName(username); if (userEntity==null) throw new ServerException(ServerCode.USER_NOT_FOUND); if (!userEntity.getPassword().equals(password)) throw new Se...
UserServiceImpl implements UserService { @Override public UserVo login(String username, String password) throws ServerException { UserEntity userEntity = userDao.findByName(username); if (userEntity==null) throw new ServerException(ServerCode.USER_NOT_FOUND); if (!userEntity.getPassword().equals(password)) throw new Se...
@Test public void getActivenessStat() throws Exception { System.out.println(activenessService .getActivenessStat((int)(System.currentTimeMillis()/(3600*1000)), QueryThreshold.HOUR,10,null)); }
@Override public List<ActivenessVo> getActivenessStat(int startHour, QueryThreshold threshold, int startRange, String probeId) throws ParamException { if (threshold==null) throw new ParamException(ServerCode.PARAM_FORMAT,"threshold","threshold cannot be null"); return activenessDao.getActivenessStat(startHour, threshol...
ActivenessServiceImpl implements ActivenessService { @Override public List<ActivenessVo> getActivenessStat(int startHour, QueryThreshold threshold, int startRange, String probeId) throws ParamException { if (threshold==null) throw new ParamException(ServerCode.PARAM_FORMAT,"threshold","threshold cannot be null"); retur...
ActivenessServiceImpl implements ActivenessService { @Override public List<ActivenessVo> getActivenessStat(int startHour, QueryThreshold threshold, int startRange, String probeId) throws ParamException { if (threshold==null) throw new ParamException(ServerCode.PARAM_FORMAT,"threshold","threshold cannot be null"); retur...
ActivenessServiceImpl implements ActivenessService { @Override public List<ActivenessVo> getActivenessStat(int startHour, QueryThreshold threshold, int startRange, String probeId) throws ParamException { if (threshold==null) throw new ParamException(ServerCode.PARAM_FORMAT,"threshold","threshold cannot be null"); retur...
ActivenessServiceImpl implements ActivenessService { @Override public List<ActivenessVo> getActivenessStat(int startHour, QueryThreshold threshold, int startRange, String probeId) throws ParamException { if (threshold==null) throw new ParamException(ServerCode.PARAM_FORMAT,"threshold","threshold cannot be null"); retur...
@Test public void findByHourAndProbe() throws Exception { System.out.println(activenessService.findByHourAndProbe((int)(System.currentTimeMillis()/(3600*1000)),"1s12sz")); }
@Override public List<Tuple<String, Number>> findByHourAndProbe(int hour, String probeId) { ActivenessEntity activenessEntity = activenessDao.findByHourAndProbe(hour, probeId); return ObjectMapper.convertToChartData(activenessEntity); }
ActivenessServiceImpl implements ActivenessService { @Override public List<Tuple<String, Number>> findByHourAndProbe(int hour, String probeId) { ActivenessEntity activenessEntity = activenessDao.findByHourAndProbe(hour, probeId); return ObjectMapper.convertToChartData(activenessEntity); } }
ActivenessServiceImpl implements ActivenessService { @Override public List<Tuple<String, Number>> findByHourAndProbe(int hour, String probeId) { ActivenessEntity activenessEntity = activenessDao.findByHourAndProbe(hour, probeId); return ObjectMapper.convertToChartData(activenessEntity); } }
ActivenessServiceImpl implements ActivenessService { @Override public List<Tuple<String, Number>> findByHourAndProbe(int hour, String probeId) { ActivenessEntity activenessEntity = activenessDao.findByHourAndProbe(hour, probeId); return ObjectMapper.convertToChartData(activenessEntity); } @Override List<ActivenessVo> ...
ActivenessServiceImpl implements ActivenessService { @Override public List<Tuple<String, Number>> findByHourAndProbe(int hour, String probeId) { ActivenessEntity activenessEntity = activenessDao.findByHourAndProbe(hour, probeId); return ObjectMapper.convertToChartData(activenessEntity); } @Override List<ActivenessVo> ...
@Test public void findById() throws Exception { System.out.println(activenessService.findById(1)); }
@Override public ActivenessVo findById(int id) throws ServerException { ActivenessEntity entity = activenessDao.findById(id); if (entity==null) throw new ServerException(ServerCode.NOT_FOUND); return new ActivenessVo(entity); }
ActivenessServiceImpl implements ActivenessService { @Override public ActivenessVo findById(int id) throws ServerException { ActivenessEntity entity = activenessDao.findById(id); if (entity==null) throw new ServerException(ServerCode.NOT_FOUND); return new ActivenessVo(entity); } }
ActivenessServiceImpl implements ActivenessService { @Override public ActivenessVo findById(int id) throws ServerException { ActivenessEntity entity = activenessDao.findById(id); if (entity==null) throw new ServerException(ServerCode.NOT_FOUND); return new ActivenessVo(entity); } }
ActivenessServiceImpl implements ActivenessService { @Override public ActivenessVo findById(int id) throws ServerException { ActivenessEntity entity = activenessDao.findById(id); if (entity==null) throw new ServerException(ServerCode.NOT_FOUND); return new ActivenessVo(entity); } @Override List<ActivenessVo> getActive...
ActivenessServiceImpl implements ActivenessService { @Override public ActivenessVo findById(int id) throws ServerException { ActivenessEntity entity = activenessDao.findById(id); if (entity==null) throw new ServerException(ServerCode.NOT_FOUND); return new ActivenessVo(entity); } @Override List<ActivenessVo> getActive...
@Test public void commit() throws Exception { }
@Override @Scheduled(cron = "0 0/20 7-23 * * ?") public void commit() { new Thread( () -> { try { if (concurrentDataList.getSize()>0) { int sleep = (int) (Math.random()*60000); try { Thread.sleep(sleep); } catch (InterruptedException e) { e.printStackTrace(); } List<ProbeJson> probeJsons = concurrentDataList.getAll(); ...
ReceiverServiceImpl implements ReceiverService { @Override @Scheduled(cron = "0 0/20 7-23 * * ?") public void commit() { new Thread( () -> { try { if (concurrentDataList.getSize()>0) { int sleep = (int) (Math.random()*60000); try { Thread.sleep(sleep); } catch (InterruptedException e) { e.printStackTrace(); } List<Prob...
ReceiverServiceImpl implements ReceiverService { @Override @Scheduled(cron = "0 0/20 7-23 * * ?") public void commit() { new Thread( () -> { try { if (concurrentDataList.getSize()>0) { int sleep = (int) (Math.random()*60000); try { Thread.sleep(sleep); } catch (InterruptedException e) { e.printStackTrace(); } List<Prob...
ReceiverServiceImpl implements ReceiverService { @Override @Scheduled(cron = "0 0/20 7-23 * * ?") public void commit() { new Thread( () -> { try { if (concurrentDataList.getSize()>0) { int sleep = (int) (Math.random()*60000); try { Thread.sleep(sleep); } catch (InterruptedException e) { e.printStackTrace(); } List<Prob...
ReceiverServiceImpl implements ReceiverService { @Override @Scheduled(cron = "0 0/20 7-23 * * ?") public void commit() { new Thread( () -> { try { if (concurrentDataList.getSize()>0) { int sleep = (int) (Math.random()*60000); try { Thread.sleep(sleep); } catch (InterruptedException e) { e.printStackTrace(); } List<Prob...
@Test public void save() throws Exception { }
@Override public ActivenessVo save(CustomerActivenessElement activenessElement) { ActivenessEntity entity = new ActivenessEntity(); entity.setWifiProb(activenessElement.getWifiProb()); entity.setHour(new Timestamp(activenessElement.getHour()*3600*1000)); entity.setNumOfHighActive(activenessElement.getNumOfHighActive())...
ActivenessServiceImpl implements ActivenessService { @Override public ActivenessVo save(CustomerActivenessElement activenessElement) { ActivenessEntity entity = new ActivenessEntity(); entity.setWifiProb(activenessElement.getWifiProb()); entity.setHour(new Timestamp(activenessElement.getHour()*3600*1000)); entity.setNu...
ActivenessServiceImpl implements ActivenessService { @Override public ActivenessVo save(CustomerActivenessElement activenessElement) { ActivenessEntity entity = new ActivenessEntity(); entity.setWifiProb(activenessElement.getWifiProb()); entity.setHour(new Timestamp(activenessElement.getHour()*3600*1000)); entity.setNu...
ActivenessServiceImpl implements ActivenessService { @Override public ActivenessVo save(CustomerActivenessElement activenessElement) { ActivenessEntity entity = new ActivenessEntity(); entity.setWifiProb(activenessElement.getWifiProb()); entity.setHour(new Timestamp(activenessElement.getHour()*3600*1000)); entity.setNu...
ActivenessServiceImpl implements ActivenessService { @Override public ActivenessVo save(CustomerActivenessElement activenessElement) { ActivenessEntity entity = new ActivenessEntity(); entity.setWifiProb(activenessElement.getWifiProb()); entity.setHour(new Timestamp(activenessElement.getHour()*3600*1000)); entity.setNu...
@Test public void getVisitCircleStat() throws Exception { System.out.println(visitCircleService .getVisitCircleStat((int)(System.currentTimeMillis()/(3600*1000)-1), QueryThreshold.HOUR,10,null)); }
@Override public List<VisitCircleVo> getVisitCircleStat(int startHour, QueryThreshold threshold, int startRange, String probeId) throws ParamException { if (threshold==null) throw new ParamException(ServerCode.PARAM_FORMAT,"threshold","threshold cannot be null"); return visitCircleDao.getVisitCircleStat(startHour, thre...
VisitCircleServiceImpl implements VisitCircleService { @Override public List<VisitCircleVo> getVisitCircleStat(int startHour, QueryThreshold threshold, int startRange, String probeId) throws ParamException { if (threshold==null) throw new ParamException(ServerCode.PARAM_FORMAT,"threshold","threshold cannot be null"); r...
VisitCircleServiceImpl implements VisitCircleService { @Override public List<VisitCircleVo> getVisitCircleStat(int startHour, QueryThreshold threshold, int startRange, String probeId) throws ParamException { if (threshold==null) throw new ParamException(ServerCode.PARAM_FORMAT,"threshold","threshold cannot be null"); r...
VisitCircleServiceImpl implements VisitCircleService { @Override public List<VisitCircleVo> getVisitCircleStat(int startHour, QueryThreshold threshold, int startRange, String probeId) throws ParamException { if (threshold==null) throw new ParamException(ServerCode.PARAM_FORMAT,"threshold","threshold cannot be null"); r...
VisitCircleServiceImpl implements VisitCircleService { @Override public List<VisitCircleVo> getVisitCircleStat(int startHour, QueryThreshold threshold, int startRange, String probeId) throws ParamException { if (threshold==null) throw new ParamException(ServerCode.PARAM_FORMAT,"threshold","threshold cannot be null"); r...
@Test public void findByHourAndProbe() throws Exception { System.out.println((int)(System.currentTimeMillis()/(3600*1000)-1)); System.out.println(visitCircleService.findByHourAndProbe((int)(System.currentTimeMillis()/(3600*1000)),"1s12sz")); }
@Override public List<Tuple<String, Number>> findByHourAndProbe(int hour, String probeId) { return ObjectMapper.convertToViewData( ObjectMapper.convertToChartData(visitCircleDao.findByHourAndProbe(hour, probeId)), ConvertType.circle); }
VisitCircleServiceImpl implements VisitCircleService { @Override public List<Tuple<String, Number>> findByHourAndProbe(int hour, String probeId) { return ObjectMapper.convertToViewData( ObjectMapper.convertToChartData(visitCircleDao.findByHourAndProbe(hour, probeId)), ConvertType.circle); } }
VisitCircleServiceImpl implements VisitCircleService { @Override public List<Tuple<String, Number>> findByHourAndProbe(int hour, String probeId) { return ObjectMapper.convertToViewData( ObjectMapper.convertToChartData(visitCircleDao.findByHourAndProbe(hour, probeId)), ConvertType.circle); } }
VisitCircleServiceImpl implements VisitCircleService { @Override public List<Tuple<String, Number>> findByHourAndProbe(int hour, String probeId) { return ObjectMapper.convertToViewData( ObjectMapper.convertToChartData(visitCircleDao.findByHourAndProbe(hour, probeId)), ConvertType.circle); } @Override List<VisitCircleV...
VisitCircleServiceImpl implements VisitCircleService { @Override public List<Tuple<String, Number>> findByHourAndProbe(int hour, String probeId) { return ObjectMapper.convertToViewData( ObjectMapper.convertToChartData(visitCircleDao.findByHourAndProbe(hour, probeId)), ConvertType.circle); } @Override List<VisitCircleV...
@Test public void findById() throws Exception { }
@Override public VisitCircleVo findById(int id) throws ServerException { VisitCircleEntity visitCircleEntity = visitCircleDao.findById(id); if (visitCircleEntity==null) throw new ServerException(ServerCode.NOT_FOUND); return new VisitCircleVo(visitCircleEntity); }
VisitCircleServiceImpl implements VisitCircleService { @Override public VisitCircleVo findById(int id) throws ServerException { VisitCircleEntity visitCircleEntity = visitCircleDao.findById(id); if (visitCircleEntity==null) throw new ServerException(ServerCode.NOT_FOUND); return new VisitCircleVo(visitCircleEntity); } ...
VisitCircleServiceImpl implements VisitCircleService { @Override public VisitCircleVo findById(int id) throws ServerException { VisitCircleEntity visitCircleEntity = visitCircleDao.findById(id); if (visitCircleEntity==null) throw new ServerException(ServerCode.NOT_FOUND); return new VisitCircleVo(visitCircleEntity); } ...
VisitCircleServiceImpl implements VisitCircleService { @Override public VisitCircleVo findById(int id) throws ServerException { VisitCircleEntity visitCircleEntity = visitCircleDao.findById(id); if (visitCircleEntity==null) throw new ServerException(ServerCode.NOT_FOUND); return new VisitCircleVo(visitCircleEntity); } ...
VisitCircleServiceImpl implements VisitCircleService { @Override public VisitCircleVo findById(int id) throws ServerException { VisitCircleEntity visitCircleEntity = visitCircleDao.findById(id); if (visitCircleEntity==null) throw new ServerException(ServerCode.NOT_FOUND); return new VisitCircleVo(visitCircleEntity); } ...
@Test public void save() throws Exception { }
@Override public VisitCircleVo save(VisitingCycleElement visitingCycleElement) { VisitCircleEntity entity = new VisitCircleEntity(); entity.setWifiProb(visitingCycleElement.getWifiProb()); entity.setHour(new Timestamp(visitingCycleElement.getHour()*3600*1000)); List<Tuple<Long,Integer>> data = visitingCycleElement.getS...
VisitCircleServiceImpl implements VisitCircleService { @Override public VisitCircleVo save(VisitingCycleElement visitingCycleElement) { VisitCircleEntity entity = new VisitCircleEntity(); entity.setWifiProb(visitingCycleElement.getWifiProb()); entity.setHour(new Timestamp(visitingCycleElement.getHour()*3600*1000)); Lis...
VisitCircleServiceImpl implements VisitCircleService { @Override public VisitCircleVo save(VisitingCycleElement visitingCycleElement) { VisitCircleEntity entity = new VisitCircleEntity(); entity.setWifiProb(visitingCycleElement.getWifiProb()); entity.setHour(new Timestamp(visitingCycleElement.getHour()*3600*1000)); Lis...
VisitCircleServiceImpl implements VisitCircleService { @Override public VisitCircleVo save(VisitingCycleElement visitingCycleElement) { VisitCircleEntity entity = new VisitCircleEntity(); entity.setWifiProb(visitingCycleElement.getWifiProb()); entity.setHour(new Timestamp(visitingCycleElement.getHour()*3600*1000)); Lis...
VisitCircleServiceImpl implements VisitCircleService { @Override public VisitCircleVo save(VisitingCycleElement visitingCycleElement) { VisitCircleEntity entity = new VisitCircleEntity(); entity.setWifiProb(visitingCycleElement.getWifiProb()); entity.setHour(new Timestamp(visitingCycleElement.getHour()*3600*1000)); Lis...
@Test public void findAll() throws Exception { System.out.println(probeService.findAll(0,10).getContent()); }
@Override public Page<ProbeVo> findAll(int page, int size) { Page<ProbeEntity> probeEntities = probeDao.findAll(page, size); return new PageImpl<>(probeEntities.getContent().stream().map(ProbeVo::new).collect(Collectors.toList()), probeEntities.nextPageable(),probeEntities.getTotalElements()); }
ProbeServiceImpl implements ProbeService { @Override public Page<ProbeVo> findAll(int page, int size) { Page<ProbeEntity> probeEntities = probeDao.findAll(page, size); return new PageImpl<>(probeEntities.getContent().stream().map(ProbeVo::new).collect(Collectors.toList()), probeEntities.nextPageable(),probeEntities.get...
ProbeServiceImpl implements ProbeService { @Override public Page<ProbeVo> findAll(int page, int size) { Page<ProbeEntity> probeEntities = probeDao.findAll(page, size); return new PageImpl<>(probeEntities.getContent().stream().map(ProbeVo::new).collect(Collectors.toList()), probeEntities.nextPageable(),probeEntities.get...
ProbeServiceImpl implements ProbeService { @Override public Page<ProbeVo> findAll(int page, int size) { Page<ProbeEntity> probeEntities = probeDao.findAll(page, size); return new PageImpl<>(probeEntities.getContent().stream().map(ProbeVo::new).collect(Collectors.toList()), probeEntities.nextPageable(),probeEntities.get...
ProbeServiceImpl implements ProbeService { @Override public Page<ProbeVo> findAll(int page, int size) { Page<ProbeEntity> probeEntities = probeDao.findAll(page, size); return new PageImpl<>(probeEntities.getContent().stream().map(ProbeVo::new).collect(Collectors.toList()), probeEntities.nextPageable(),probeEntities.get...
@Test public void findById() throws Exception { System.out.println(probeService.findById(1)); }
@Override public ProbeVo findById(int id) throws ServerException { ProbeEntity probeEntity = probeDao.findById(id); if (probeEntity==null) throw new ServerException(ServerCode.NOT_FOUND); return new ProbeVo(probeEntity); }
ProbeServiceImpl implements ProbeService { @Override public ProbeVo findById(int id) throws ServerException { ProbeEntity probeEntity = probeDao.findById(id); if (probeEntity==null) throw new ServerException(ServerCode.NOT_FOUND); return new ProbeVo(probeEntity); } }
ProbeServiceImpl implements ProbeService { @Override public ProbeVo findById(int id) throws ServerException { ProbeEntity probeEntity = probeDao.findById(id); if (probeEntity==null) throw new ServerException(ServerCode.NOT_FOUND); return new ProbeVo(probeEntity); } }
ProbeServiceImpl implements ProbeService { @Override public ProbeVo findById(int id) throws ServerException { ProbeEntity probeEntity = probeDao.findById(id); if (probeEntity==null) throw new ServerException(ServerCode.NOT_FOUND); return new ProbeVo(probeEntity); } @Override Page<ProbeVo> findAll(int page, int size); ...
ProbeServiceImpl implements ProbeService { @Override public ProbeVo findById(int id) throws ServerException { ProbeEntity probeEntity = probeDao.findById(id); if (probeEntity==null) throw new ServerException(ServerCode.NOT_FOUND); return new ProbeVo(probeEntity); } @Override Page<ProbeVo> findAll(int page, int size); ...
@Test public void getFStat() throws Exception { System.out.println(flowService .getFStat((int)(System.currentTimeMillis()/(3600*1000)-1), QueryThreshold.HOUR,10,null)); }
@Override public List<FlowVo> getFStat(int startHour, QueryThreshold threshold, int startRange, String probeId) throws ParamException { if (threshold==null) throw new ParamException(ServerCode.PARAM_FORMAT,"threshold","threshold cannot be null"); return flowDao.getFlowStat(startHour, threshold, startRange, probeId); }
FlowServiceImpl implements FlowService { @Override public List<FlowVo> getFStat(int startHour, QueryThreshold threshold, int startRange, String probeId) throws ParamException { if (threshold==null) throw new ParamException(ServerCode.PARAM_FORMAT,"threshold","threshold cannot be null"); return flowDao.getFlowStat(start...
FlowServiceImpl implements FlowService { @Override public List<FlowVo> getFStat(int startHour, QueryThreshold threshold, int startRange, String probeId) throws ParamException { if (threshold==null) throw new ParamException(ServerCode.PARAM_FORMAT,"threshold","threshold cannot be null"); return flowDao.getFlowStat(start...
FlowServiceImpl implements FlowService { @Override public List<FlowVo> getFStat(int startHour, QueryThreshold threshold, int startRange, String probeId) throws ParamException { if (threshold==null) throw new ParamException(ServerCode.PARAM_FORMAT,"threshold","threshold cannot be null"); return flowDao.getFlowStat(start...
FlowServiceImpl implements FlowService { @Override public List<FlowVo> getFStat(int startHour, QueryThreshold threshold, int startRange, String probeId) throws ParamException { if (threshold==null) throw new ParamException(ServerCode.PARAM_FORMAT,"threshold","threshold cannot be null"); return flowDao.getFlowStat(start...
@Test public void findByHourAndProbe() throws Exception { System.out.println(flowService.findByHourAndProbe((int)(System.currentTimeMillis()/(3600*1000)-1),"1s12sz")); }
@Override public List<Tuple<String, Number>> findByHourAndProbe(int hour, String probeId) { return ObjectMapper.convertToChartData(flowDao.findByHourAndProbe(hour, probeId)); }
FlowServiceImpl implements FlowService { @Override public List<Tuple<String, Number>> findByHourAndProbe(int hour, String probeId) { return ObjectMapper.convertToChartData(flowDao.findByHourAndProbe(hour, probeId)); } }
FlowServiceImpl implements FlowService { @Override public List<Tuple<String, Number>> findByHourAndProbe(int hour, String probeId) { return ObjectMapper.convertToChartData(flowDao.findByHourAndProbe(hour, probeId)); } }
FlowServiceImpl implements FlowService { @Override public List<Tuple<String, Number>> findByHourAndProbe(int hour, String probeId) { return ObjectMapper.convertToChartData(flowDao.findByHourAndProbe(hour, probeId)); } @Override List<FlowVo> getFStat(int startHour, QueryThreshold threshold, int startRange, String probe...
FlowServiceImpl implements FlowService { @Override public List<Tuple<String, Number>> findByHourAndProbe(int hour, String probeId) { return ObjectMapper.convertToChartData(flowDao.findByHourAndProbe(hour, probeId)); } @Override List<FlowVo> getFStat(int startHour, QueryThreshold threshold, int startRange, String probe...
@Test public void findById() throws Exception { }
@Override public FlowVo findById(int id) throws ServerException { FlowEntity entity = flowDao.findById(id); if (entity==null) throw new ServerException(ServerCode.NOT_FOUND); return new FlowVo(entity); }
FlowServiceImpl implements FlowService { @Override public FlowVo findById(int id) throws ServerException { FlowEntity entity = flowDao.findById(id); if (entity==null) throw new ServerException(ServerCode.NOT_FOUND); return new FlowVo(entity); } }
FlowServiceImpl implements FlowService { @Override public FlowVo findById(int id) throws ServerException { FlowEntity entity = flowDao.findById(id); if (entity==null) throw new ServerException(ServerCode.NOT_FOUND); return new FlowVo(entity); } }
FlowServiceImpl implements FlowService { @Override public FlowVo findById(int id) throws ServerException { FlowEntity entity = flowDao.findById(id); if (entity==null) throw new ServerException(ServerCode.NOT_FOUND); return new FlowVo(entity); } @Override List<FlowVo> getFStat(int startHour, QueryThreshold threshold, i...
FlowServiceImpl implements FlowService { @Override public FlowVo findById(int id) throws ServerException { FlowEntity entity = flowDao.findById(id); if (entity==null) throw new ServerException(ServerCode.NOT_FOUND); return new FlowVo(entity); } @Override List<FlowVo> getFStat(int startHour, QueryThreshold threshold, i...
@Test public void sendGet() throws Exception { URLConnection connection = HttpTools.sendGet("http: Map<String, List<String>> map = connection.getHeaderFields(); for (String key : map.keySet()) { System.out.println(key + "--->" + map.get(key)); } }
public static URLConnection sendGet(String url) { try { URL realUrl = new URL(url); URLConnection connection = realUrl.openConnection(); connection.setRequestProperty("connection", "Keep-Alive"); connection.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)"); connection.setConnect...
HttpTools { public static URLConnection sendGet(String url) { try { URL realUrl = new URL(url); URLConnection connection = realUrl.openConnection(); connection.setRequestProperty("connection", "Keep-Alive"); connection.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)"); connectio...
HttpTools { public static URLConnection sendGet(String url) { try { URL realUrl = new URL(url); URLConnection connection = realUrl.openConnection(); connection.setRequestProperty("connection", "Keep-Alive"); connection.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)"); connectio...
HttpTools { public static URLConnection sendGet(String url) { try { URL realUrl = new URL(url); URLConnection connection = realUrl.openConnection(); connection.setRequestProperty("connection", "Keep-Alive"); connection.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)"); connectio...
HttpTools { public static URLConnection sendGet(String url) { try { URL realUrl = new URL(url); URLConnection connection = realUrl.openConnection(); connection.setRequestProperty("connection", "Keep-Alive"); connection.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)"); connectio...
@Test public void save() throws Exception { }
@Override public FlowVo save(CustomerFlowElement flowElement) { FlowEntity flowEntity = new FlowEntity(); flowEntity.setWifiProb(flowElement.getWifiProb()); flowEntity.setHour(new Timestamp(flowElement.getHour()*3600*1000)); flowEntity.setInNoOutWifi(flowElement.getInNoOutWifi()); flowEntity.setInNoOutStore(flowElement...
FlowServiceImpl implements FlowService { @Override public FlowVo save(CustomerFlowElement flowElement) { FlowEntity flowEntity = new FlowEntity(); flowEntity.setWifiProb(flowElement.getWifiProb()); flowEntity.setHour(new Timestamp(flowElement.getHour()*3600*1000)); flowEntity.setInNoOutWifi(flowElement.getInNoOutWifi()...
FlowServiceImpl implements FlowService { @Override public FlowVo save(CustomerFlowElement flowElement) { FlowEntity flowEntity = new FlowEntity(); flowEntity.setWifiProb(flowElement.getWifiProb()); flowEntity.setHour(new Timestamp(flowElement.getHour()*3600*1000)); flowEntity.setInNoOutWifi(flowElement.getInNoOutWifi()...
FlowServiceImpl implements FlowService { @Override public FlowVo save(CustomerFlowElement flowElement) { FlowEntity flowEntity = new FlowEntity(); flowEntity.setWifiProb(flowElement.getWifiProb()); flowEntity.setHour(new Timestamp(flowElement.getHour()*3600*1000)); flowEntity.setInNoOutWifi(flowElement.getInNoOutWifi()...
FlowServiceImpl implements FlowService { @Override public FlowVo save(CustomerFlowElement flowElement) { FlowEntity flowEntity = new FlowEntity(); flowEntity.setWifiProb(flowElement.getWifiProb()); flowEntity.setHour(new Timestamp(flowElement.getHour()*3600*1000)); flowEntity.setInNoOutWifi(flowElement.getInNoOutWifi()...
@Test public void getStoreHoursStat() throws Exception { System.out.println(storeHoursService .getStoreHoursStat((int)(System.currentTimeMillis()/(3600*1000)-1000), QueryThreshold.DAY,30,null)); }
@Override public List<StoreHoursVo> getStoreHoursStat(int startHour, QueryThreshold threshold, int startRange, String probeId) throws ParamException { if (threshold==null) throw new ParamException(ServerCode.PARAM_FORMAT,"threshold","threshold cannot be null"); return storeHoursDao.getStoreHoursStat(startHour, threshol...
StoreHoursServiceImpl implements StoreHoursService { @Override public List<StoreHoursVo> getStoreHoursStat(int startHour, QueryThreshold threshold, int startRange, String probeId) throws ParamException { if (threshold==null) throw new ParamException(ServerCode.PARAM_FORMAT,"threshold","threshold cannot be null"); retur...
StoreHoursServiceImpl implements StoreHoursService { @Override public List<StoreHoursVo> getStoreHoursStat(int startHour, QueryThreshold threshold, int startRange, String probeId) throws ParamException { if (threshold==null) throw new ParamException(ServerCode.PARAM_FORMAT,"threshold","threshold cannot be null"); retur...
StoreHoursServiceImpl implements StoreHoursService { @Override public List<StoreHoursVo> getStoreHoursStat(int startHour, QueryThreshold threshold, int startRange, String probeId) throws ParamException { if (threshold==null) throw new ParamException(ServerCode.PARAM_FORMAT,"threshold","threshold cannot be null"); retur...
StoreHoursServiceImpl implements StoreHoursService { @Override public List<StoreHoursVo> getStoreHoursStat(int startHour, QueryThreshold threshold, int startRange, String probeId) throws ParamException { if (threshold==null) throw new ParamException(ServerCode.PARAM_FORMAT,"threshold","threshold cannot be null"); retur...
@Test public void findByHourAndProbe() throws Exception { System.out.println(storeHoursService.findByHourAndProbe((int)(System.currentTimeMillis()/(3600*1000)),"1s12sz")); }
@Override public List<Tuple<String, Number>> findByHourAndProbe(int hour, String probeId) { return ObjectMapper.convertToViewData( ObjectMapper.convertToChartData(storeHoursDao.findByHourAndProbe(hour, probeId)), ConvertType.store); }
StoreHoursServiceImpl implements StoreHoursService { @Override public List<Tuple<String, Number>> findByHourAndProbe(int hour, String probeId) { return ObjectMapper.convertToViewData( ObjectMapper.convertToChartData(storeHoursDao.findByHourAndProbe(hour, probeId)), ConvertType.store); } }
StoreHoursServiceImpl implements StoreHoursService { @Override public List<Tuple<String, Number>> findByHourAndProbe(int hour, String probeId) { return ObjectMapper.convertToViewData( ObjectMapper.convertToChartData(storeHoursDao.findByHourAndProbe(hour, probeId)), ConvertType.store); } }
StoreHoursServiceImpl implements StoreHoursService { @Override public List<Tuple<String, Number>> findByHourAndProbe(int hour, String probeId) { return ObjectMapper.convertToViewData( ObjectMapper.convertToChartData(storeHoursDao.findByHourAndProbe(hour, probeId)), ConvertType.store); } @Override List<StoreHoursVo> ge...
StoreHoursServiceImpl implements StoreHoursService { @Override public List<Tuple<String, Number>> findByHourAndProbe(int hour, String probeId) { return ObjectMapper.convertToViewData( ObjectMapper.convertToChartData(storeHoursDao.findByHourAndProbe(hour, probeId)), ConvertType.store); } @Override List<StoreHoursVo> ge...
@Test public void findById() throws Exception { }
@Override public StoreHoursVo findById(int id) throws ServerException { StoreHoursEntity entity = storeHoursDao.findById(id); if (entity==null) throw new ServerException(ServerCode.NOT_FOUND); return new StoreHoursVo(entity); }
StoreHoursServiceImpl implements StoreHoursService { @Override public StoreHoursVo findById(int id) throws ServerException { StoreHoursEntity entity = storeHoursDao.findById(id); if (entity==null) throw new ServerException(ServerCode.NOT_FOUND); return new StoreHoursVo(entity); } }
StoreHoursServiceImpl implements StoreHoursService { @Override public StoreHoursVo findById(int id) throws ServerException { StoreHoursEntity entity = storeHoursDao.findById(id); if (entity==null) throw new ServerException(ServerCode.NOT_FOUND); return new StoreHoursVo(entity); } }
StoreHoursServiceImpl implements StoreHoursService { @Override public StoreHoursVo findById(int id) throws ServerException { StoreHoursEntity entity = storeHoursDao.findById(id); if (entity==null) throw new ServerException(ServerCode.NOT_FOUND); return new StoreHoursVo(entity); } @Override List<StoreHoursVo> getStoreH...
StoreHoursServiceImpl implements StoreHoursService { @Override public StoreHoursVo findById(int id) throws ServerException { StoreHoursEntity entity = storeHoursDao.findById(id); if (entity==null) throw new ServerException(ServerCode.NOT_FOUND); return new StoreHoursVo(entity); } @Override List<StoreHoursVo> getStoreH...
@Test public void save() throws Exception { }
@Override public StoreHoursVo save(InStoreHoursElement storeHoursElement) { StoreHoursEntity entity = new StoreHoursEntity(); entity.setWifiProb(storeHoursElement.getWifiProb()); entity.setHour(new Timestamp(storeHoursElement.getHour()*3600*1000)); List<Tuple<Long,Integer>> data = storeHoursElement.getStatistic(); int ...
StoreHoursServiceImpl implements StoreHoursService { @Override public StoreHoursVo save(InStoreHoursElement storeHoursElement) { StoreHoursEntity entity = new StoreHoursEntity(); entity.setWifiProb(storeHoursElement.getWifiProb()); entity.setHour(new Timestamp(storeHoursElement.getHour()*3600*1000)); List<Tuple<Long,In...
StoreHoursServiceImpl implements StoreHoursService { @Override public StoreHoursVo save(InStoreHoursElement storeHoursElement) { StoreHoursEntity entity = new StoreHoursEntity(); entity.setWifiProb(storeHoursElement.getWifiProb()); entity.setHour(new Timestamp(storeHoursElement.getHour()*3600*1000)); List<Tuple<Long,In...
StoreHoursServiceImpl implements StoreHoursService { @Override public StoreHoursVo save(InStoreHoursElement storeHoursElement) { StoreHoursEntity entity = new StoreHoursEntity(); entity.setWifiProb(storeHoursElement.getWifiProb()); entity.setHour(new Timestamp(storeHoursElement.getHour()*3600*1000)); List<Tuple<Long,In...
StoreHoursServiceImpl implements StoreHoursService { @Override public StoreHoursVo save(InStoreHoursElement storeHoursElement) { StoreHoursEntity entity = new StoreHoursEntity(); entity.setWifiProb(storeHoursElement.getWifiProb()); entity.setHour(new Timestamp(storeHoursElement.getHour()*3600*1000)); List<Tuple<Long,In...
@Test public void getLocalIp() throws Exception { System.out.println(HttpTools.getLocalIp()); }
public static String getLocalIp() { InputStream inputStream = HttpTools.class.getClassLoader().getResourceAsStream("config/ipconfig"); BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream)); try { String config = reader.readLine(); Enumeration<NetworkInterface> netInterfaces; try { netInterfaces...
HttpTools { public static String getLocalIp() { InputStream inputStream = HttpTools.class.getClassLoader().getResourceAsStream("config/ipconfig"); BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream)); try { String config = reader.readLine(); Enumeration<NetworkInterface> netInterfaces; try { n...
HttpTools { public static String getLocalIp() { InputStream inputStream = HttpTools.class.getClassLoader().getResourceAsStream("config/ipconfig"); BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream)); try { String config = reader.readLine(); Enumeration<NetworkInterface> netInterfaces; try { n...
HttpTools { public static String getLocalIp() { InputStream inputStream = HttpTools.class.getClassLoader().getResourceAsStream("config/ipconfig"); BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream)); try { String config = reader.readLine(); Enumeration<NetworkInterface> netInterfaces; try { n...
HttpTools { public static String getLocalIp() { InputStream inputStream = HttpTools.class.getClassLoader().getResourceAsStream("config/ipconfig"); BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream)); try { String config = reader.readLine(); Enumeration<NetworkInterface> netInterfaces; try { n...
@Test public void getActivenessStat() throws Exception { long time = System.currentTimeMillis(); int hour = (int) (time/(1000*60*60)); System.out.println(activenessDao.getActivenessStat(hour, QueryThreshold.HOUR, 10, null)); }
@Override public List<ActivenessVo> getActivenessStat(int startHour, QueryThreshold threshold, int statRange, String probeId) { String isProbeSelected = probeId==null || probeId.isEmpty()? "": "AND wifiProb = :probeId "; String sqlQuery = "SELECT wifiProb,DATE_FORMAT(hour,:dateFormat),sum(numOfHighActive)," + "sum(numO...
ActivenessDaoImpl implements ActivenessDao { @Override public List<ActivenessVo> getActivenessStat(int startHour, QueryThreshold threshold, int statRange, String probeId) { String isProbeSelected = probeId==null || probeId.isEmpty()? "": "AND wifiProb = :probeId "; String sqlQuery = "SELECT wifiProb,DATE_FORMAT(hour,:d...
ActivenessDaoImpl implements ActivenessDao { @Override public List<ActivenessVo> getActivenessStat(int startHour, QueryThreshold threshold, int statRange, String probeId) { String isProbeSelected = probeId==null || probeId.isEmpty()? "": "AND wifiProb = :probeId "; String sqlQuery = "SELECT wifiProb,DATE_FORMAT(hour,:d...
ActivenessDaoImpl implements ActivenessDao { @Override public List<ActivenessVo> getActivenessStat(int startHour, QueryThreshold threshold, int statRange, String probeId) { String isProbeSelected = probeId==null || probeId.isEmpty()? "": "AND wifiProb = :probeId "; String sqlQuery = "SELECT wifiProb,DATE_FORMAT(hour,:d...
ActivenessDaoImpl implements ActivenessDao { @Override public List<ActivenessVo> getActivenessStat(int startHour, QueryThreshold threshold, int statRange, String probeId) { String isProbeSelected = probeId==null || probeId.isEmpty()? "": "AND wifiProb = :probeId "; String sqlQuery = "SELECT wifiProb,DATE_FORMAT(hour,:d...
@Test public void findByHourAndProbe() throws Exception { }
@Override public ActivenessEntity findByHourAndProbe(int hour, String probeId) { Timestamp timestamp = new Timestamp(((long) hour)*3600*1000); System.out.println(timestamp.getTime()); return activenessRepository.findByHourAndWifiProb(timestamp,probeId); }
ActivenessDaoImpl implements ActivenessDao { @Override public ActivenessEntity findByHourAndProbe(int hour, String probeId) { Timestamp timestamp = new Timestamp(((long) hour)*3600*1000); System.out.println(timestamp.getTime()); return activenessRepository.findByHourAndWifiProb(timestamp,probeId); } }
ActivenessDaoImpl implements ActivenessDao { @Override public ActivenessEntity findByHourAndProbe(int hour, String probeId) { Timestamp timestamp = new Timestamp(((long) hour)*3600*1000); System.out.println(timestamp.getTime()); return activenessRepository.findByHourAndWifiProb(timestamp,probeId); } }
ActivenessDaoImpl implements ActivenessDao { @Override public ActivenessEntity findByHourAndProbe(int hour, String probeId) { Timestamp timestamp = new Timestamp(((long) hour)*3600*1000); System.out.println(timestamp.getTime()); return activenessRepository.findByHourAndWifiProb(timestamp,probeId); } @Override List<Act...
ActivenessDaoImpl implements ActivenessDao { @Override public ActivenessEntity findByHourAndProbe(int hour, String probeId) { Timestamp timestamp = new Timestamp(((long) hour)*3600*1000); System.out.println(timestamp.getTime()); return activenessRepository.findByHourAndWifiProb(timestamp,probeId); } @Override List<Act...
@Test public void findById() throws Exception { }
@Override public ActivenessEntity findById(int id) { return activenessRepository.findOne(id); }
ActivenessDaoImpl implements ActivenessDao { @Override public ActivenessEntity findById(int id) { return activenessRepository.findOne(id); } }
ActivenessDaoImpl implements ActivenessDao { @Override public ActivenessEntity findById(int id) { return activenessRepository.findOne(id); } }
ActivenessDaoImpl implements ActivenessDao { @Override public ActivenessEntity findById(int id) { return activenessRepository.findOne(id); } @Override List<ActivenessVo> getActivenessStat(int startHour, QueryThreshold threshold, int statRange, String probeId); @Override ActivenessEntity findByHourAndProbe(int hour, St...
ActivenessDaoImpl implements ActivenessDao { @Override public ActivenessEntity findById(int id) { return activenessRepository.findOne(id); } @Override List<ActivenessVo> getActivenessStat(int startHour, QueryThreshold threshold, int statRange, String probeId); @Override ActivenessEntity findByHourAndProbe(int hour, St...
@Test public void save() throws Exception { }
@Override public ActivenessEntity save(ActivenessEntity entity) { return activenessRepository.save(entity); }
ActivenessDaoImpl implements ActivenessDao { @Override public ActivenessEntity save(ActivenessEntity entity) { return activenessRepository.save(entity); } }
ActivenessDaoImpl implements ActivenessDao { @Override public ActivenessEntity save(ActivenessEntity entity) { return activenessRepository.save(entity); } }
ActivenessDaoImpl implements ActivenessDao { @Override public ActivenessEntity save(ActivenessEntity entity) { return activenessRepository.save(entity); } @Override List<ActivenessVo> getActivenessStat(int startHour, QueryThreshold threshold, int statRange, String probeId); @Override ActivenessEntity findByHourAndProb...
ActivenessDaoImpl implements ActivenessDao { @Override public ActivenessEntity save(ActivenessEntity entity) { return activenessRepository.save(entity); } @Override List<ActivenessVo> getActivenessStat(int startHour, QueryThreshold threshold, int statRange, String probeId); @Override ActivenessEntity findByHourAndProb...
@Test public void findById() throws Exception { System.out.println(userDao.findById(1).getUsername()); }
@Override public UserEntity findById(int id) { return userRepository.findOne(id); }
UserDaoImpl implements UserDao { @Override public UserEntity findById(int id) { return userRepository.findOne(id); } }
UserDaoImpl implements UserDao { @Override public UserEntity findById(int id) { return userRepository.findOne(id); } }
UserDaoImpl implements UserDao { @Override public UserEntity findById(int id) { return userRepository.findOne(id); } @Override UserEntity findById(int id); @Override UserEntity findByName(String name); @Override UserEntity findByNameAndPassword(String name, String password); @Override UserEntity save(UserEntity userEn...
UserDaoImpl implements UserDao { @Override public UserEntity findById(int id) { return userRepository.findOne(id); } @Override UserEntity findById(int id); @Override UserEntity findByName(String name); @Override UserEntity findByNameAndPassword(String name, String password); @Override UserEntity save(UserEntity userEn...
@Test public void findByName() throws Exception { System.out.println(userDao.findByName("admin")); }
@Override public UserEntity findByName(String name) { return userRepository.findByUsername(name); }
UserDaoImpl implements UserDao { @Override public UserEntity findByName(String name) { return userRepository.findByUsername(name); } }
UserDaoImpl implements UserDao { @Override public UserEntity findByName(String name) { return userRepository.findByUsername(name); } }
UserDaoImpl implements UserDao { @Override public UserEntity findByName(String name) { return userRepository.findByUsername(name); } @Override UserEntity findById(int id); @Override UserEntity findByName(String name); @Override UserEntity findByNameAndPassword(String name, String password); @Override UserEntity save(U...
UserDaoImpl implements UserDao { @Override public UserEntity findByName(String name) { return userRepository.findByUsername(name); } @Override UserEntity findById(int id); @Override UserEntity findByName(String name); @Override UserEntity findByNameAndPassword(String name, String password); @Override UserEntity save(U...
@Test public void testIncompletePotSim() { PotentiometerSimulator pot = new PotentiometerSimulator(null, null); Assertions.assertFalse(pot.isSetup()); new AnalogInput(0); pot = new PotentiometerSimulator(SensorActuatorRegistry.get().getAnalogIn().get(0), null); Assertions.assertFalse(pot.isSetup()); }
public boolean isSetup() { return mIsSetup; }
PotentiometerSimulator implements ISimulatorUpdater { public boolean isSetup() { return mIsSetup; } }
PotentiometerSimulator implements ISimulatorUpdater { public boolean isSetup() { return mIsSetup; } PotentiometerSimulator(IAnalogInWrapper aWrapper, IPwmWrapper aSpeedController); }
PotentiometerSimulator implements ISimulatorUpdater { public boolean isSetup() { return mIsSetup; } PotentiometerSimulator(IAnalogInWrapper aWrapper, IPwmWrapper aSpeedController); void setParameters(double aThrow, double aMinVoltage, double aMaxVoltage); @Override void update(); boolean isSetup(); @Override Object get...
PotentiometerSimulator implements ISimulatorUpdater { public boolean isSetup() { return mIsSetup; } PotentiometerSimulator(IAnalogInWrapper aWrapper, IPwmWrapper aSpeedController); void setParameters(double aThrow, double aMinVoltage, double aMaxVoltage); @Override void update(); boolean isSetup(); @Override Object get...
@Test public void testCompressorWrapper() { CompressorWrapper compressor = new CompressorWrapper(); compressor.setChargeRate(.1); Assertions.assertEquals(120, compressor.getAirPressure(), DOUBLE_EPSILON); compressor.solenoidFired(60); Assertions.assertEquals(60, compressor.getAirPressure(), DOUBLE_EPSILON); simulateFor...
public CompressorWrapper() { super("Compressor"); mAirPressure = 120; mChargeRate = .25; }
CompressorWrapper extends ASensorWrapper { public CompressorWrapper() { super("Compressor"); mAirPressure = 120; mChargeRate = .25; } }
CompressorWrapper extends ASensorWrapper { public CompressorWrapper() { super("Compressor"); mAirPressure = 120; mChargeRate = .25; } CompressorWrapper(); }
CompressorWrapper extends ASensorWrapper { public CompressorWrapper() { super("Compressor"); mAirPressure = 120; mChargeRate = .25; } CompressorWrapper(); void setChargeRate(double aChargeRate); void solenoidFired(double aPressure); void update(); double getAirPressure(); }
CompressorWrapper extends ASensorWrapper { public CompressorWrapper() { super("Compressor"); mAirPressure = 120; mChargeRate = .25; } CompressorWrapper(); void setChargeRate(double aChargeRate); void solenoidFired(double aPressure); void update(); double getAirPressure(); }
@Test public void testASimulator() { String file = extractFiles("testReadFile.yml"); ASimulator baseSimulator = new ASimulator(); Assertions.assertTrue(baseSimulator.loadConfig(file)); new MockRobot(); AccelerometerWrapperAccessor accelerometerAccessor = DataAccessorFactory.getInstance().getAccelerometerAccessor(); Ana...
protected ASimulator() { }
ASimulator implements ISimulatorUpdater { protected ASimulator() { } }
ASimulator implements ISimulatorUpdater { protected ASimulator() { } protected ASimulator(); }
ASimulator implements ISimulatorUpdater { protected ASimulator() { } protected ASimulator(); boolean loadConfig(String aConfigFile); @Override void update(); @Override void setRobot(IRobotClassContainer aRobot); String getConfigFile(); }
ASimulator implements ISimulatorUpdater { protected ASimulator() { } protected ASimulator(); boolean loadConfig(String aConfigFile); @Override void update(); @Override void setRobot(IRobotClassContainer aRobot); String getConfigFile(); }
@Test public void testJoystickFactory() { File configFile = new File(JoystickFactory.sJOYSTICK_CONFIG_FILE); if (configFile.exists()) { Assertions.assertTrue(configFile.delete()); } if (!configFile.getParentFile().exists()) { Assertions.assertTrue(configFile.getParentFile().mkdirs()); } JoystickFactory factory = Joysti...
private JoystickFactory() { mJoystickMap = new IMockJoystick[DriverStation.kJoystickPorts]; for (int i = 0; i < DriverStation.kJoystickPorts; ++i) { mJoystickMap[i] = new NullJoystick(); } mControllerConfig = JoystickDiscoverer.rediscoverJoysticks(); loadSticks(); }
JoystickFactory { private JoystickFactory() { mJoystickMap = new IMockJoystick[DriverStation.kJoystickPorts]; for (int i = 0; i < DriverStation.kJoystickPorts; ++i) { mJoystickMap[i] = new NullJoystick(); } mControllerConfig = JoystickDiscoverer.rediscoverJoysticks(); loadSticks(); } }
JoystickFactory { private JoystickFactory() { mJoystickMap = new IMockJoystick[DriverStation.kJoystickPorts]; for (int i = 0; i < DriverStation.kJoystickPorts; ++i) { mJoystickMap[i] = new NullJoystick(); } mControllerConfig = JoystickDiscoverer.rediscoverJoysticks(); loadSticks(); } private JoystickFactory(); }
JoystickFactory { private JoystickFactory() { mJoystickMap = new IMockJoystick[DriverStation.kJoystickPorts]; for (int i = 0; i < DriverStation.kJoystickPorts; ++i) { mJoystickMap[i] = new NullJoystick(); } mControllerConfig = JoystickDiscoverer.rediscoverJoysticks(); loadSticks(); } private JoystickFactory(); static ...
JoystickFactory { private JoystickFactory() { mJoystickMap = new IMockJoystick[DriverStation.kJoystickPorts]; for (int i = 0; i < DriverStation.kJoystickPorts; ++i) { mJoystickMap[i] = new NullJoystick(); } mControllerConfig = JoystickDiscoverer.rediscoverJoysticks(); loadSticks(); } private JoystickFactory(); static ...
@Test public void testKeyboardJoystick() throws Exception { XboxJoystick joystick = new XboxJoystick(new MockController()); float[] axisValues = joystick.getAxisValues(); short[] povValues = joystick.getPovValues(); int buttonMask = joystick.getButtonMask(); Assertions.assertEquals(6, axisValues.length); Assertions.ass...
@Override public float[] getAxisValues() { float[] output = super.getAxisValues(); float triggerValue = output[2]; if (triggerValue < 0) { output[2] = 0; output[3] = triggerValue; } else { output[2] = triggerValue; output[3] = 0; } return output; }
XboxJoystick extends BaseJoystick { @Override public float[] getAxisValues() { float[] output = super.getAxisValues(); float triggerValue = output[2]; if (triggerValue < 0) { output[2] = 0; output[3] = triggerValue; } else { output[2] = triggerValue; output[3] = 0; } return output; } }
XboxJoystick extends BaseJoystick { @Override public float[] getAxisValues() { float[] output = super.getAxisValues(); float triggerValue = output[2]; if (triggerValue < 0) { output[2] = 0; output[3] = triggerValue; } else { output[2] = triggerValue; output[3] = 0; } return output; } XboxJoystick(Controller aController...
XboxJoystick extends BaseJoystick { @Override public float[] getAxisValues() { float[] output = super.getAxisValues(); float triggerValue = output[2]; if (triggerValue < 0) { output[2] = 0; output[3] = triggerValue; } else { output[2] = triggerValue; output[3] = 0; } return output; } XboxJoystick(Controller aController...
XboxJoystick extends BaseJoystick { @Override public float[] getAxisValues() { float[] output = super.getAxisValues(); float triggerValue = output[2]; if (triggerValue < 0) { output[2] = 0; output[3] = triggerValue; } else { output[2] = triggerValue; output[3] = 0; } return output; } XboxJoystick(Controller aController...
@Test public void testKeyboardJoystick() throws Exception { MockController controller = new MockController(); KeyboardJoystick joystick = new KeyboardJoystick(controller); short[] povValues = joystick.getPovValues(); Assertions.assertEquals(-1, povValues[0]); testAxis(joystick, 0, 0, 0, 0, 0, 0); reset(controller); con...
public KeyboardJoystick(Controller aController) { this(aController, "Keyboard"); }
KeyboardJoystick extends BaseJoystick { public KeyboardJoystick(Controller aController) { this(aController, "Keyboard"); } }
KeyboardJoystick extends BaseJoystick { public KeyboardJoystick(Controller aController) { this(aController, "Keyboard"); } KeyboardJoystick(Controller aController); KeyboardJoystick(Controller aController, String aName); }
KeyboardJoystick extends BaseJoystick { public KeyboardJoystick(Controller aController) { this(aController, "Keyboard"); } KeyboardJoystick(Controller aController); KeyboardJoystick(Controller aController, String aName); @Override float[] getAxisValues(); @Override short[] getPovValues(); }
KeyboardJoystick extends BaseJoystick { public KeyboardJoystick(Controller aController) { this(aController, "Keyboard"); } KeyboardJoystick(Controller aController); KeyboardJoystick(Controller aController, String aName); @Override float[] getAxisValues(); @Override short[] getPovValues(); }
@Test public void isPresentTest(){ B1 b = null; assertEquals(false, GuavaUtils.isPresent(b)); b = new B1(); assertEquals(true, GuavaUtils.isPresent(b)); }
public static <T> boolean isPresent(T t){ Optional<T>optionalObj = Optional.fromNullable(t); return optionalObj.isPresent(); }
GuavaUtils { public static <T> boolean isPresent(T t){ Optional<T>optionalObj = Optional.fromNullable(t); return optionalObj.isPresent(); } }
GuavaUtils { public static <T> boolean isPresent(T t){ Optional<T>optionalObj = Optional.fromNullable(t); return optionalObj.isPresent(); } }
GuavaUtils { public static <T> boolean isPresent(T t){ Optional<T>optionalObj = Optional.fromNullable(t); return optionalObj.isPresent(); } static boolean isPresent(T t); }
GuavaUtils { public static <T> boolean isPresent(T t){ Optional<T>optionalObj = Optional.fromNullable(t); return optionalObj.isPresent(); } static boolean isPresent(T t); }
@Test public void testDozer(){ B1 b = new B1(); b.setName("sa"); B2 b2 = DozerUtils.convertSourceObjToDesObj(b, B2.class); Assert.assertEquals("sa", b2.getAge()); }
public static <T> T convertSourceObjToDesObj(Object source,Class<T> destinationClass){ return mapper.map(source, destinationClass); }
DozerUtils { public static <T> T convertSourceObjToDesObj(Object source,Class<T> destinationClass){ return mapper.map(source, destinationClass); } }
DozerUtils { public static <T> T convertSourceObjToDesObj(Object source,Class<T> destinationClass){ return mapper.map(source, destinationClass); } }
DozerUtils { public static <T> T convertSourceObjToDesObj(Object source,Class<T> destinationClass){ return mapper.map(source, destinationClass); } static T convertSourceObjToDesObj(Object source,Class<T> destinationClass); static void main(String[] args); }
DozerUtils { public static <T> T convertSourceObjToDesObj(Object source,Class<T> destinationClass){ return mapper.map(source, destinationClass); } static T convertSourceObjToDesObj(Object source,Class<T> destinationClass); static void main(String[] args); }
@Test public void testAgentMaster() throws Exception { AgentMaster master = AgentMaster.getAgentMaster(); while (master.getMasterActor() == null) { } String instId = "instance-0"; Object answer = master.askMaster(AgentToMaster.RegisterNewAgent.getInstance(instId)); assertTrue(answer instanceof MasterToAgent.AgentRegist...
private AgentMaster(SmartConf conf) throws IOException { String[] addresses = AgentUtils.getMasterAddress(conf); if (addresses == null) { throw new IOException("AgentMaster address not configured!"); } String address = addresses[0]; LOG.info("Agent master: " + address); Config config = AgentUtils.overrideRemoteAddress(...
AgentMaster { private AgentMaster(SmartConf conf) throws IOException { String[] addresses = AgentUtils.getMasterAddress(conf); if (addresses == null) { throw new IOException("AgentMaster address not configured!"); } String address = addresses[0]; LOG.info("Agent master: " + address); Config config = AgentUtils.override...
AgentMaster { private AgentMaster(SmartConf conf) throws IOException { String[] addresses = AgentUtils.getMasterAddress(conf); if (addresses == null) { throw new IOException("AgentMaster address not configured!"); } String address = addresses[0]; LOG.info("Agent master: " + address); Config config = AgentUtils.override...
AgentMaster { private AgentMaster(SmartConf conf) throws IOException { String[] addresses = AgentUtils.getMasterAddress(conf); if (addresses == null) { throw new IOException("AgentMaster address not configured!"); } String address = addresses[0]; LOG.info("Agent master: " + address); Config config = AgentUtils.override...
AgentMaster { private AgentMaster(SmartConf conf) throws IOException { String[] addresses = AgentUtils.getMasterAddress(conf); if (addresses == null) { throw new IOException("AgentMaster address not configured!"); } String address = addresses[0]; LOG.info("Agent master: " + address); Config config = AgentUtils.override...
@Test public void testGetNonExistFile() throws Exception { FileInfo info = metaStore.getFile("/non_exist_file_path"); Assert.assertTrue(info == null); }
public FileInfo getFile(long fid) throws MetaStoreException { updateCache(); try { return fileInfoDao.getById(fid); } catch (EmptyResultDataAccessException e) { return null; } catch (Exception e) { throw new MetaStoreException(e); } }
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public FileInfo getFile(long fid) throws MetaStoreException { updateCache(); try { return fileInfoDao.getById(fid); } catch (EmptyResultDataAccessException e) { return null; } catch (Exception e) { throw new MetaStoreException(e); } } }
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public FileInfo getFile(long fid) throws MetaStoreException { updateCache(); try { return fileInfoDao.getById(fid); } catch (EmptyResultDataAccessException e) { return null; } catch (Exception e) { throw new MetaStoreException(e); } } MetaStor...
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public FileInfo getFile(long fid) throws MetaStoreException { updateCache(); try { return fileInfoDao.getById(fid); } catch (EmptyResultDataAccessException e) { return null; } catch (Exception e) { throw new MetaStoreException(e); } } MetaStor...
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public FileInfo getFile(long fid) throws MetaStoreException { updateCache(); try { return fileInfoDao.getById(fid); } catch (EmptyResultDataAccessException e) { return null; } catch (Exception e) { throw new MetaStoreException(e); } } MetaStor...
@Test public void testGetStoreCapacityOfDifferentStorageType() throws Exception { DataNodeStorageInfo info1 = new DataNodeStorageInfo("1", "ssd", 1, "1", 1, 1, 1, 1, 1); DataNodeStorageInfo info2 = new DataNodeStorageInfo("2", "ssd", 2, "2", 2, 2, 2, 2, 2); metaStore.insertDataNodeStorageInfo(info1); metaStore.insertDa...
public long getStoreCapacityOfDifferentStorageType(String storageType) throws MetaStoreException { try { int sid = 0; if (storageType.equals("ram")) { sid = 0; } if (storageType.equals("ssd")) { sid = 1; } if (storageType.equals("disk")) { sid = 2; } if (storageType.equals("archive")) { sid = 3; } List<DataNodeStorageI...
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public long getStoreCapacityOfDifferentStorageType(String storageType) throws MetaStoreException { try { int sid = 0; if (storageType.equals("ram")) { sid = 0; } if (storageType.equals("ssd")) { sid = 1; } if (storageType.equals("disk")) { sid...
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public long getStoreCapacityOfDifferentStorageType(String storageType) throws MetaStoreException { try { int sid = 0; if (storageType.equals("ram")) { sid = 0; } if (storageType.equals("ssd")) { sid = 1; } if (storageType.equals("disk")) { sid...
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public long getStoreCapacityOfDifferentStorageType(String storageType) throws MetaStoreException { try { int sid = 0; if (storageType.equals("ram")) { sid = 0; } if (storageType.equals("ssd")) { sid = 1; } if (storageType.equals("disk")) { sid...
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public long getStoreCapacityOfDifferentStorageType(String storageType) throws MetaStoreException { try { int sid = 0; if (storageType.equals("ram")) { sid = 0; } if (storageType.equals("ssd")) { sid = 1; } if (storageType.equals("disk")) { sid...
@Test public void testGetStoreFreeOfDifferentStorageType() throws Exception { DataNodeStorageInfo info1 = new DataNodeStorageInfo("1", "ssd", 1, "1", 1, 1, 1, 1, 1); DataNodeStorageInfo info2 = new DataNodeStorageInfo("2", "ssd", 2, "2", 2, 2, 2, 2, 2); metaStore.insertDataNodeStorageInfo(info1); metaStore.insertDataNo...
public long getStoreFreeOfDifferentStorageType(String storageType) throws MetaStoreException { try { int sid = 0; if (storageType.equals("ram")) { sid = 0; } if (storageType.equals("ssd")) { sid = 1; } if (storageType.equals("disk")) { sid = 2; } if (storageType.equals("archive")) { sid = 3; } List<DataNodeStorageInfo>...
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public long getStoreFreeOfDifferentStorageType(String storageType) throws MetaStoreException { try { int sid = 0; if (storageType.equals("ram")) { sid = 0; } if (storageType.equals("ssd")) { sid = 1; } if (storageType.equals("disk")) { sid = 2...
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public long getStoreFreeOfDifferentStorageType(String storageType) throws MetaStoreException { try { int sid = 0; if (storageType.equals("ram")) { sid = 0; } if (storageType.equals("ssd")) { sid = 1; } if (storageType.equals("disk")) { sid = 2...
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public long getStoreFreeOfDifferentStorageType(String storageType) throws MetaStoreException { try { int sid = 0; if (storageType.equals("ram")) { sid = 0; } if (storageType.equals("ssd")) { sid = 1; } if (storageType.equals("disk")) { sid = 2...
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public long getStoreFreeOfDifferentStorageType(String storageType) throws MetaStoreException { try { int sid = 0; if (storageType.equals("ram")) { sid = 0; } if (storageType.equals("ssd")) { sid = 1; } if (storageType.equals("disk")) { sid = 2...
@Test public void testGetStorageCapacity() throws Exception { StorageCapacity storage1 = new StorageCapacity("HDD", 12343333L, 2223333L); StorageCapacity storage2 = new StorageCapacity("RAM", 12342233L, 2223663L); StorageCapacity[] storages = {storage1, storage2}; metaStore.insertUpdateStoragesTable(storages); Assert.a...
public Map<String, StorageCapacity> getStorageCapacity() throws MetaStoreException { updateCache(); Map<String, StorageCapacity> ret = new HashMap<>(); Map<String, StorageCapacity> currentMapStorageCapacity = mapStorageCapacity; if (currentMapStorageCapacity != null) { for (String key : currentMapStorageCapacity.keySet...
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public Map<String, StorageCapacity> getStorageCapacity() throws MetaStoreException { updateCache(); Map<String, StorageCapacity> ret = new HashMap<>(); Map<String, StorageCapacity> currentMapStorageCapacity = mapStorageCapacity; if (currentMap...
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public Map<String, StorageCapacity> getStorageCapacity() throws MetaStoreException { updateCache(); Map<String, StorageCapacity> ret = new HashMap<>(); Map<String, StorageCapacity> currentMapStorageCapacity = mapStorageCapacity; if (currentMap...
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public Map<String, StorageCapacity> getStorageCapacity() throws MetaStoreException { updateCache(); Map<String, StorageCapacity> ret = new HashMap<>(); Map<String, StorageCapacity> currentMapStorageCapacity = mapStorageCapacity; if (currentMap...
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public Map<String, StorageCapacity> getStorageCapacity() throws MetaStoreException { updateCache(); Map<String, StorageCapacity> ret = new HashMap<>(); Map<String, StorageCapacity> currentMapStorageCapacity = mapStorageCapacity; if (currentMap...
@Test public void testUpdateCachedFiles() throws Exception { metaStore.insertCachedFiles(80L, "testPath", 1000L, 2000L, 100); metaStore.insertCachedFiles(90L, "testPath2", 2000L, 3000L, 200); Map<String, Long> pathToId = new HashMap<>(); pathToId.put("testPath", 80L); pathToId.put("testPath2", 90L); pathToId.put("testP...
public boolean updateCachedFiles(Long fid, Long lastAccessTime, Integer numAccessed) throws MetaStoreException { try { return cacheFileDao.update(fid, lastAccessTime, numAccessed) >= 0; } catch (Exception e) { throw new MetaStoreException(e); } }
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public boolean updateCachedFiles(Long fid, Long lastAccessTime, Integer numAccessed) throws MetaStoreException { try { return cacheFileDao.update(fid, lastAccessTime, numAccessed) >= 0; } catch (Exception e) { throw new MetaStoreException(e); ...
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public boolean updateCachedFiles(Long fid, Long lastAccessTime, Integer numAccessed) throws MetaStoreException { try { return cacheFileDao.update(fid, lastAccessTime, numAccessed) >= 0; } catch (Exception e) { throw new MetaStoreException(e); ...
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public boolean updateCachedFiles(Long fid, Long lastAccessTime, Integer numAccessed) throws MetaStoreException { try { return cacheFileDao.update(fid, lastAccessTime, numAccessed) >= 0; } catch (Exception e) { throw new MetaStoreException(e); ...
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public boolean updateCachedFiles(Long fid, Long lastAccessTime, Integer numAccessed) throws MetaStoreException { try { return cacheFileDao.update(fid, lastAccessTime, numAccessed) >= 0; } catch (Exception e) { throw new MetaStoreException(e); ...
@Test public void testGetCachedFileStatus() throws Exception { metaStore.insertCachedFiles(6L, "testPath", 1490918400000L, 234567L, 456); metaStore.insertCachedFiles(19L, "testPath", 1490918400000L, 234567L, 456); metaStore.insertCachedFiles(23L, "testPath", 1490918400000L, 234567L, 456); CachedFileStatus cachedFileSta...
public List<CachedFileStatus> getCachedFileStatus() throws MetaStoreException { try { return cacheFileDao.getAll(); } catch (EmptyResultDataAccessException e) { return new ArrayList<>(); } catch (Exception e) { throw new MetaStoreException(e); } }
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public List<CachedFileStatus> getCachedFileStatus() throws MetaStoreException { try { return cacheFileDao.getAll(); } catch (EmptyResultDataAccessException e) { return new ArrayList<>(); } catch (Exception e) { throw new MetaStoreException(e);...
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public List<CachedFileStatus> getCachedFileStatus() throws MetaStoreException { try { return cacheFileDao.getAll(); } catch (EmptyResultDataAccessException e) { return new ArrayList<>(); } catch (Exception e) { throw new MetaStoreException(e);...
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public List<CachedFileStatus> getCachedFileStatus() throws MetaStoreException { try { return cacheFileDao.getAll(); } catch (EmptyResultDataAccessException e) { return new ArrayList<>(); } catch (Exception e) { throw new MetaStoreException(e);...
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public List<CachedFileStatus> getCachedFileStatus() throws MetaStoreException { try { return cacheFileDao.getAll(); } catch (EmptyResultDataAccessException e) { return new ArrayList<>(); } catch (Exception e) { throw new MetaStoreException(e);...
@Test public void testdeleteFinishedCmdletsWithGenTimeBefore() throws Exception { Map<String, String> args = new HashMap(); CmdletInfo command1 = new CmdletInfo(0, 78, CmdletState.CANCELLED, "test", 123L, 232444444L); metaStore.insertCmdlet(command1); CmdletInfo command2 = new CmdletInfo(1, 78, CmdletState.DONE, "tt", ...
public int deleteFinishedCmdletsWithGenTimeBefore(long timestamp) throws MetaStoreException { try { return cmdletDao.deleteBeforeTime(timestamp); } catch (Exception e) { throw new MetaStoreException(e); } }
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public int deleteFinishedCmdletsWithGenTimeBefore(long timestamp) throws MetaStoreException { try { return cmdletDao.deleteBeforeTime(timestamp); } catch (Exception e) { throw new MetaStoreException(e); } } }
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public int deleteFinishedCmdletsWithGenTimeBefore(long timestamp) throws MetaStoreException { try { return cmdletDao.deleteBeforeTime(timestamp); } catch (Exception e) { throw new MetaStoreException(e); } } MetaStore(DBPool pool); }
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public int deleteFinishedCmdletsWithGenTimeBefore(long timestamp) throws MetaStoreException { try { return cmdletDao.deleteBeforeTime(timestamp); } catch (Exception e) { throw new MetaStoreException(e); } } MetaStore(DBPool pool); Connection g...
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public int deleteFinishedCmdletsWithGenTimeBefore(long timestamp) throws MetaStoreException { try { return cmdletDao.deleteBeforeTime(timestamp); } catch (Exception e) { throw new MetaStoreException(e); } } MetaStore(DBPool pool); Connection g...
@Test public void testdeleteKeepNewCmdlets() throws Exception { Map<String, String> args = new HashMap(); CmdletInfo command1 = new CmdletInfo(0, 78, CmdletState.CANCELLED, "test", 123L, 232444444L); metaStore.insertCmdlet(command1); CmdletInfo command2 = new CmdletInfo(1, 78, CmdletState.DONE, "tt", 128L, 232444994L);...
public int deleteKeepNewCmdlets(long num) throws MetaStoreException { try { return cmdletDao.deleteKeepNewCmd(num); } catch (Exception e) { throw new MetaStoreException(e); } }
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public int deleteKeepNewCmdlets(long num) throws MetaStoreException { try { return cmdletDao.deleteKeepNewCmd(num); } catch (Exception e) { throw new MetaStoreException(e); } } }
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public int deleteKeepNewCmdlets(long num) throws MetaStoreException { try { return cmdletDao.deleteKeepNewCmd(num); } catch (Exception e) { throw new MetaStoreException(e); } } MetaStore(DBPool pool); }
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public int deleteKeepNewCmdlets(long num) throws MetaStoreException { try { return cmdletDao.deleteKeepNewCmd(num); } catch (Exception e) { throw new MetaStoreException(e); } } MetaStore(DBPool pool); Connection getConnection(); DBType getDbTy...
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public int deleteKeepNewCmdlets(long num) throws MetaStoreException { try { return cmdletDao.deleteKeepNewCmd(num); } catch (Exception e) { throw new MetaStoreException(e); } } MetaStore(DBPool pool); Connection getConnection(); DBType getDbTy...
@Test public void testGetNewCreatedActions() throws Exception { Map<String, String> args = new HashMap(); List<ActionInfo> actionInfos; ActionInfo actionInfo = new ActionInfo(1, 1, "cache", args, "Test", "Test", true, 123213213L, true, 123123L, 100); metaStore.insertAction(actionInfo); actionInfo.setActionId(2); metaSt...
public List<ActionInfo> getNewCreatedActions( int size) throws MetaStoreException { if (size < 0) { return new ArrayList<>(); } try { return actionDao.getLatestActions(size); } catch (EmptyResultDataAccessException e) { return new ArrayList<>(); } catch (Exception e) { throw new MetaStoreException(e); } }
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public List<ActionInfo> getNewCreatedActions( int size) throws MetaStoreException { if (size < 0) { return new ArrayList<>(); } try { return actionDao.getLatestActions(size); } catch (EmptyResultDataAccessException e) { return new ArrayList<>(...
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public List<ActionInfo> getNewCreatedActions( int size) throws MetaStoreException { if (size < 0) { return new ArrayList<>(); } try { return actionDao.getLatestActions(size); } catch (EmptyResultDataAccessException e) { return new ArrayList<>(...
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public List<ActionInfo> getNewCreatedActions( int size) throws MetaStoreException { if (size < 0) { return new ArrayList<>(); } try { return actionDao.getLatestActions(size); } catch (EmptyResultDataAccessException e) { return new ArrayList<>(...
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public List<ActionInfo> getNewCreatedActions( int size) throws MetaStoreException { if (size < 0) { return new ArrayList<>(); } try { return actionDao.getLatestActions(size); } catch (EmptyResultDataAccessException e) { return new ArrayList<>(...
@Test public void testGetMaxActionId() throws Exception { long currentId = metaStore.getMaxActionId(); Map<String, String> args = new HashMap(); Assert.assertTrue(currentId == 0); ActionInfo actionInfo = new ActionInfo( currentId, 1, "cache", args, "Test", "Test", true, 123213213L, true, 123123L, 100); metaStore.insert...
public long getMaxActionId() throws MetaStoreException { try { return actionDao.getMaxId(); } catch (Exception e) { throw new MetaStoreException(e); } }
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public long getMaxActionId() throws MetaStoreException { try { return actionDao.getMaxId(); } catch (Exception e) { throw new MetaStoreException(e); } } }
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public long getMaxActionId() throws MetaStoreException { try { return actionDao.getMaxId(); } catch (Exception e) { throw new MetaStoreException(e); } } MetaStore(DBPool pool); }
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public long getMaxActionId() throws MetaStoreException { try { return actionDao.getMaxId(); } catch (Exception e) { throw new MetaStoreException(e); } } MetaStore(DBPool pool); Connection getConnection(); DBType getDbType(); Long queryForLong(...
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public long getMaxActionId() throws MetaStoreException { try { return actionDao.getMaxId(); } catch (Exception e) { throw new MetaStoreException(e); } } MetaStore(DBPool pool); Connection getConnection(); DBType getDbType(); Long queryForLong(...
@Test public void testSetClusterConfig() throws MetaStoreException { ClusterConfig clusterConfig = new ClusterConfig(1, "test", "test1"); metaStore.setClusterConfig(clusterConfig); List<ClusterConfig> list = new LinkedList<>(); list.add(clusterConfig); Assert.assertTrue(metaStore.listClusterConfig().equals(list)); list...
public void setClusterConfig( ClusterConfig clusterConfig) throws MetaStoreException { try { if (clusterConfigDao.getCountByName(clusterConfig.getNodeName()) == 0) { clusterConfigDao.insert(clusterConfig); } else { clusterConfigDao.updateByNodeName(clusterConfig.getNodeName(), clusterConfig.getConfigPath()); } } catch ...
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public void setClusterConfig( ClusterConfig clusterConfig) throws MetaStoreException { try { if (clusterConfigDao.getCountByName(clusterConfig.getNodeName()) == 0) { clusterConfigDao.insert(clusterConfig); } else { clusterConfigDao.updateByNod...
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public void setClusterConfig( ClusterConfig clusterConfig) throws MetaStoreException { try { if (clusterConfigDao.getCountByName(clusterConfig.getNodeName()) == 0) { clusterConfigDao.insert(clusterConfig); } else { clusterConfigDao.updateByNod...
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public void setClusterConfig( ClusterConfig clusterConfig) throws MetaStoreException { try { if (clusterConfigDao.getCountByName(clusterConfig.getNodeName()) == 0) { clusterConfigDao.insert(clusterConfig); } else { clusterConfigDao.updateByNod...
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public void setClusterConfig( ClusterConfig clusterConfig) throws MetaStoreException { try { if (clusterConfigDao.getCountByName(clusterConfig.getNodeName()) == 0) { clusterConfigDao.insert(clusterConfig); } else { clusterConfigDao.updateByNod...
@Test public void testDelClusterConfig() throws MetaStoreException { ClusterConfig clusterConfig = new ClusterConfig(1, "test", "test1"); metaStore.setClusterConfig(clusterConfig); metaStore.delClusterConfig(clusterConfig); Assert.assertTrue(metaStore.listClusterConfig().size() == 0); }
public void delClusterConfig( ClusterConfig clusterConfig) throws MetaStoreException { try { if (clusterConfigDao.getCountByName(clusterConfig.getNodeName()) > 0) { clusterConfigDao.delete(clusterConfig.getCid()); } } catch (Exception e) { throw new MetaStoreException(e); } }
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public void delClusterConfig( ClusterConfig clusterConfig) throws MetaStoreException { try { if (clusterConfigDao.getCountByName(clusterConfig.getNodeName()) > 0) { clusterConfigDao.delete(clusterConfig.getCid()); } } catch (Exception e) { thr...
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public void delClusterConfig( ClusterConfig clusterConfig) throws MetaStoreException { try { if (clusterConfigDao.getCountByName(clusterConfig.getNodeName()) > 0) { clusterConfigDao.delete(clusterConfig.getCid()); } } catch (Exception e) { thr...
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public void delClusterConfig( ClusterConfig clusterConfig) throws MetaStoreException { try { if (clusterConfigDao.getCountByName(clusterConfig.getNodeName()) > 0) { clusterConfigDao.delete(clusterConfig.getCid()); } } catch (Exception e) { thr...
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public void delClusterConfig( ClusterConfig clusterConfig) throws MetaStoreException { try { if (clusterConfigDao.getCountByName(clusterConfig.getNodeName()) > 0) { clusterConfigDao.delete(clusterConfig.getCid()); } } catch (Exception e) { thr...
@Test public void testSetGlobalConfig() throws MetaStoreException { GlobalConfig globalConfig = new GlobalConfig(1, "test", "test1"); metaStore.setGlobalConfig(globalConfig); Assert.assertTrue(metaStore.getDefaultGlobalConfigByName("test").equals(globalConfig)); globalConfig.setPropertyValue("test2"); metaStore.setGlob...
public void setGlobalConfig( GlobalConfig globalConfig) throws MetaStoreException { try { if (globalConfigDao.getCountByName(globalConfig.getPropertyName()) > 0) { globalConfigDao.update(globalConfig.getPropertyName(), globalConfig.getPropertyValue()); } else { globalConfigDao.insert(globalConfig); } } catch (Exception...
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public void setGlobalConfig( GlobalConfig globalConfig) throws MetaStoreException { try { if (globalConfigDao.getCountByName(globalConfig.getPropertyName()) > 0) { globalConfigDao.update(globalConfig.getPropertyName(), globalConfig.getProperty...
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public void setGlobalConfig( GlobalConfig globalConfig) throws MetaStoreException { try { if (globalConfigDao.getCountByName(globalConfig.getPropertyName()) > 0) { globalConfigDao.update(globalConfig.getPropertyName(), globalConfig.getProperty...
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public void setGlobalConfig( GlobalConfig globalConfig) throws MetaStoreException { try { if (globalConfigDao.getCountByName(globalConfig.getPropertyName()) > 0) { globalConfigDao.update(globalConfig.getPropertyName(), globalConfig.getProperty...
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public void setGlobalConfig( GlobalConfig globalConfig) throws MetaStoreException { try { if (globalConfigDao.getCountByName(globalConfig.getPropertyName()) > 0) { globalConfigDao.update(globalConfig.getPropertyName(), globalConfig.getProperty...
@Test public void testInsertDataNodeInfo() throws Exception { DataNodeInfo insertInfo1 = new DataNodeInfo("UUID1", "hostname", "www.ssm.com", 100, 50, "lab"); metaStore.insertDataNodeInfo(insertInfo1); List<DataNodeInfo> getInfo1 = metaStore.getDataNodeInfoByUuid("UUID1"); Assert.assertTrue(insertInfo1.equals(getInfo1....
public void insertDataNodeInfo(DataNodeInfo dataNodeInfo) throws MetaStoreException { try { dataNodeInfoDao.insert(dataNodeInfo); } catch (Exception e) { throw new MetaStoreException(e); } }
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public void insertDataNodeInfo(DataNodeInfo dataNodeInfo) throws MetaStoreException { try { dataNodeInfoDao.insert(dataNodeInfo); } catch (Exception e) { throw new MetaStoreException(e); } } }
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public void insertDataNodeInfo(DataNodeInfo dataNodeInfo) throws MetaStoreException { try { dataNodeInfoDao.insert(dataNodeInfo); } catch (Exception e) { throw new MetaStoreException(e); } } MetaStore(DBPool pool); }
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public void insertDataNodeInfo(DataNodeInfo dataNodeInfo) throws MetaStoreException { try { dataNodeInfoDao.insert(dataNodeInfo); } catch (Exception e) { throw new MetaStoreException(e); } } MetaStore(DBPool pool); Connection getConnection(); ...
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public void insertDataNodeInfo(DataNodeInfo dataNodeInfo) throws MetaStoreException { try { dataNodeInfoDao.insert(dataNodeInfo); } catch (Exception e) { throw new MetaStoreException(e); } } MetaStore(DBPool pool); Connection getConnection(); ...
@Test public void testDeleteDataNodeInfo() throws Exception { DataNodeInfo insertInfo1 = new DataNodeInfo("UUID1", "hostname", "www.ssm.com", 100, 50, "lab"); DataNodeInfo insertInfo2 = new DataNodeInfo("UUID2", "HOSTNAME", "www.ssm.com", 0, 0, null); DataNodeInfo insertInfo3 = new DataNodeInfo("UUID3", "HOSTNAME", "ww...
public void deleteDataNodeInfo(String uuid) throws MetaStoreException { try { dataNodeInfoDao.delete(uuid); } catch (Exception e) { throw new MetaStoreException(e); } }
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public void deleteDataNodeInfo(String uuid) throws MetaStoreException { try { dataNodeInfoDao.delete(uuid); } catch (Exception e) { throw new MetaStoreException(e); } } }
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public void deleteDataNodeInfo(String uuid) throws MetaStoreException { try { dataNodeInfoDao.delete(uuid); } catch (Exception e) { throw new MetaStoreException(e); } } MetaStore(DBPool pool); }
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public void deleteDataNodeInfo(String uuid) throws MetaStoreException { try { dataNodeInfoDao.delete(uuid); } catch (Exception e) { throw new MetaStoreException(e); } } MetaStore(DBPool pool); Connection getConnection(); DBType getDbType(); Lo...
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public void deleteDataNodeInfo(String uuid) throws MetaStoreException { try { dataNodeInfoDao.delete(uuid); } catch (Exception e) { throw new MetaStoreException(e); } } MetaStore(DBPool pool); Connection getConnection(); DBType getDbType(); Lo...
@Test public void testInsertDataNodeStorageInfo() throws Exception { DataNodeStorageInfo insertInfo1 = new DataNodeStorageInfo("UUID1", 10, 10, "storageid1", 0, 0, 0, 0, 0); metaStore.insertDataNodeStorageInfo(insertInfo1); List<DataNodeStorageInfo> getInfo1 = metaStore.getDataNodeStorageInfoByUuid("UUID1"); Assert.ass...
public void insertDataNodeStorageInfo(DataNodeStorageInfo dataNodeStorageInfo) throws MetaStoreException { try { dataNodeStorageInfoDao.insert(dataNodeStorageInfo); } catch (Exception e) { throw new MetaStoreException(e); } }
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public void insertDataNodeStorageInfo(DataNodeStorageInfo dataNodeStorageInfo) throws MetaStoreException { try { dataNodeStorageInfoDao.insert(dataNodeStorageInfo); } catch (Exception e) { throw new MetaStoreException(e); } } }
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public void insertDataNodeStorageInfo(DataNodeStorageInfo dataNodeStorageInfo) throws MetaStoreException { try { dataNodeStorageInfoDao.insert(dataNodeStorageInfo); } catch (Exception e) { throw new MetaStoreException(e); } } MetaStore(DBPool ...
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public void insertDataNodeStorageInfo(DataNodeStorageInfo dataNodeStorageInfo) throws MetaStoreException { try { dataNodeStorageInfoDao.insert(dataNodeStorageInfo); } catch (Exception e) { throw new MetaStoreException(e); } } MetaStore(DBPool ...
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public void insertDataNodeStorageInfo(DataNodeStorageInfo dataNodeStorageInfo) throws MetaStoreException { try { dataNodeStorageInfoDao.insert(dataNodeStorageInfo); } catch (Exception e) { throw new MetaStoreException(e); } } MetaStore(DBPool ...
@Test public void testDeleteDataNodeStorageInfo() throws Exception { DataNodeStorageInfo insertInfo1 = new DataNodeStorageInfo("UUID1", 10, 10, "storageid1", 0, 0, 0, 0, 0); DataNodeStorageInfo insertInfo2 = new DataNodeStorageInfo("UUID2", 10, 10, "storageid2", 0, 0, 0, 0, 0); DataNodeStorageInfo insertInfo3 = new Dat...
public void deleteDataNodeStorageInfo(String uuid) throws MetaStoreException { try { dataNodeStorageInfoDao.delete(uuid); } catch (Exception e) { throw new MetaStoreException(e); } }
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public void deleteDataNodeStorageInfo(String uuid) throws MetaStoreException { try { dataNodeStorageInfoDao.delete(uuid); } catch (Exception e) { throw new MetaStoreException(e); } } }
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public void deleteDataNodeStorageInfo(String uuid) throws MetaStoreException { try { dataNodeStorageInfoDao.delete(uuid); } catch (Exception e) { throw new MetaStoreException(e); } } MetaStore(DBPool pool); }
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public void deleteDataNodeStorageInfo(String uuid) throws MetaStoreException { try { dataNodeStorageInfoDao.delete(uuid); } catch (Exception e) { throw new MetaStoreException(e); } } MetaStore(DBPool pool); Connection getConnection(); DBType g...
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public void deleteDataNodeStorageInfo(String uuid) throws MetaStoreException { try { dataNodeStorageInfoDao.delete(uuid); } catch (Exception e) { throw new MetaStoreException(e); } } MetaStore(DBPool pool); Connection getConnection(); DBType g...
@Test public void testDeleteBackUpInfo() throws MetaStoreException { BackUpInfo backUpInfo1 = new BackUpInfo(1, "test1", "test1", 1); metaStore.insertBackUpInfo(backUpInfo1); Assert.assertTrue(metaStore.srcInbackup("test1/dfafdsaf")); Assert.assertFalse(metaStore.srcInbackup("test2")); metaStore.deleteBackUpInfo(1); As...
@Override public void deleteBackUpInfo(long rid) throws MetaStoreException { try { BackUpInfo backUpInfo = getBackUpInfo(rid); if (backUpInfo != null) { if (backUpInfoDao.getBySrc(backUpInfo.getSrc()).size() == 1) { if (setBackSrc != null) { setBackSrc.remove(backUpInfo.getSrc()); } } backUpInfoDao.delete(rid); } } cat...
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { @Override public void deleteBackUpInfo(long rid) throws MetaStoreException { try { BackUpInfo backUpInfo = getBackUpInfo(rid); if (backUpInfo != null) { if (backUpInfoDao.getBySrc(backUpInfo.getSrc()).size() == 1) { if (setBackSrc != null) { s...
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { @Override public void deleteBackUpInfo(long rid) throws MetaStoreException { try { BackUpInfo backUpInfo = getBackUpInfo(rid); if (backUpInfo != null) { if (backUpInfoDao.getBySrc(backUpInfo.getSrc()).size() == 1) { if (setBackSrc != null) { s...
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { @Override public void deleteBackUpInfo(long rid) throws MetaStoreException { try { BackUpInfo backUpInfo = getBackUpInfo(rid); if (backUpInfo != null) { if (backUpInfoDao.getBySrc(backUpInfo.getSrc()).size() == 1) { if (setBackSrc != null) { s...
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { @Override public void deleteBackUpInfo(long rid) throws MetaStoreException { try { BackUpInfo backUpInfo = getBackUpInfo(rid); if (backUpInfo != null) { if (backUpInfoDao.getBySrc(backUpInfo.getSrc()).size() == 1) { if (setBackSrc != null) { s...
@Test public void testInsertSystemInfo() throws MetaStoreException { SystemInfo systemInfo = new SystemInfo("test", "test"); metaStore.insertSystemInfo(systemInfo); Assert.assertTrue(metaStore.getSystemInfoByProperty("test").equals(systemInfo)); }
public void insertSystemInfo(SystemInfo systemInfo) throws MetaStoreException { try { if (systemInfoDao.containsProperty(systemInfo.getProperty())) { throw new Exception("The system property already exists"); } systemInfoDao.insert(systemInfo); } catch (Exception e) { throw new MetaStoreException(e); } }
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public void insertSystemInfo(SystemInfo systemInfo) throws MetaStoreException { try { if (systemInfoDao.containsProperty(systemInfo.getProperty())) { throw new Exception("The system property already exists"); } systemInfoDao.insert(systemInfo)...
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public void insertSystemInfo(SystemInfo systemInfo) throws MetaStoreException { try { if (systemInfoDao.containsProperty(systemInfo.getProperty())) { throw new Exception("The system property already exists"); } systemInfoDao.insert(systemInfo)...
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public void insertSystemInfo(SystemInfo systemInfo) throws MetaStoreException { try { if (systemInfoDao.containsProperty(systemInfo.getProperty())) { throw new Exception("The system property already exists"); } systemInfoDao.insert(systemInfo)...
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public void insertSystemInfo(SystemInfo systemInfo) throws MetaStoreException { try { if (systemInfoDao.containsProperty(systemInfo.getProperty())) { throw new Exception("The system property already exists"); } systemInfoDao.insert(systemInfo)...
@Test public void testDeleteSystemInfo() throws MetaStoreException { SystemInfo systemInfo = new SystemInfo("test", "test"); metaStore.insertSystemInfo(systemInfo); metaStore.deleteSystemInfo("test"); Assert.assertTrue(metaStore.listAllSystemInfo().size() == 0); }
public void deleteSystemInfo( String property) throws MetaStoreException { try { systemInfoDao.delete(property); } catch (Exception e) { throw new MetaStoreException(e); } }
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public void deleteSystemInfo( String property) throws MetaStoreException { try { systemInfoDao.delete(property); } catch (Exception e) { throw new MetaStoreException(e); } } }
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public void deleteSystemInfo( String property) throws MetaStoreException { try { systemInfoDao.delete(property); } catch (Exception e) { throw new MetaStoreException(e); } } MetaStore(DBPool pool); }
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public void deleteSystemInfo( String property) throws MetaStoreException { try { systemInfoDao.delete(property); } catch (Exception e) { throw new MetaStoreException(e); } } MetaStore(DBPool pool); Connection getConnection(); DBType getDbType(...
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public void deleteSystemInfo( String property) throws MetaStoreException { try { systemInfoDao.delete(property); } catch (Exception e) { throw new MetaStoreException(e); } } MetaStore(DBPool pool); Connection getConnection(); DBType getDbType(...
@Test public void testUpdateSystemInfo() throws MetaStoreException { SystemInfo systemInfo = new SystemInfo("test", "test"); metaStore.insertSystemInfo(systemInfo); SystemInfo newSystemInfo = new SystemInfo("test", "test1"); metaStore.updateSystemInfo(newSystemInfo); Assert.assertTrue(metaStore.getSystemInfoByProperty(...
public void updateSystemInfo( SystemInfo systemInfo) throws MetaStoreException { try { systemInfoDao.update(systemInfo); } catch (Exception e) { throw new MetaStoreException(e); } }
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public void updateSystemInfo( SystemInfo systemInfo) throws MetaStoreException { try { systemInfoDao.update(systemInfo); } catch (Exception e) { throw new MetaStoreException(e); } } }
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public void updateSystemInfo( SystemInfo systemInfo) throws MetaStoreException { try { systemInfoDao.update(systemInfo); } catch (Exception e) { throw new MetaStoreException(e); } } MetaStore(DBPool pool); }
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public void updateSystemInfo( SystemInfo systemInfo) throws MetaStoreException { try { systemInfoDao.update(systemInfo); } catch (Exception e) { throw new MetaStoreException(e); } } MetaStore(DBPool pool); Connection getConnection(); DBType ge...
MetaStore implements CopyMetaService, CmdletMetaService, BackupMetaService { public void updateSystemInfo( SystemInfo systemInfo) throws MetaStoreException { try { systemInfoDao.update(systemInfo); } catch (Exception e) { throw new MetaStoreException(e); } } MetaStore(DBPool pool); Connection getConnection(); DBType ge...
@Test public void testGetAPageOfAction() { Map<String, String> args = new HashMap<>(); ActionInfo actionInfo = new ActionInfo(1, 1, "cache", args, "Test", "Test", false, 123213213L, true, 123123L, 100); ActionInfo actionInfo1 = new ActionInfo(2, 1, "cache", args, "Test", "Test", false, 123213213L, true, 123123L, 100); ...
public List<ActionInfo> getAPageOfAction(long start, long offset, List<String> orderBy, List<Boolean> isDesc) { JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource); boolean ifHasAid = false; String sql = "SELECT * FROM " + TABLE_NAME + " ORDER BY "; for (int i = 0; i < orderBy.size(); i++) { if (orderBy.get(i).equ...
ActionDao { public List<ActionInfo> getAPageOfAction(long start, long offset, List<String> orderBy, List<Boolean> isDesc) { JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource); boolean ifHasAid = false; String sql = "SELECT * FROM " + TABLE_NAME + " ORDER BY "; for (int i = 0; i < orderBy.size(); i++) { if (orderB...
ActionDao { public List<ActionInfo> getAPageOfAction(long start, long offset, List<String> orderBy, List<Boolean> isDesc) { JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource); boolean ifHasAid = false; String sql = "SELECT * FROM " + TABLE_NAME + " ORDER BY "; for (int i = 0; i < orderBy.size(); i++) { if (orderB...
ActionDao { public List<ActionInfo> getAPageOfAction(long start, long offset, List<String> orderBy, List<Boolean> isDesc) { JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource); boolean ifHasAid = false; String sql = "SELECT * FROM " + TABLE_NAME + " ORDER BY "; for (int i = 0; i < orderBy.size(); i++) { if (orderB...
ActionDao { public List<ActionInfo> getAPageOfAction(long start, long offset, List<String> orderBy, List<Boolean> isDesc) { JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource); boolean ifHasAid = false; String sql = "SELECT * FROM " + TABLE_NAME + " ORDER BY "; for (int i = 0; i < orderBy.size(); i++) { if (orderB...
@Test public void testRemoteFileConcat() throws IOException { final String srcPath = "/testConcat"; final String file1 = "file1"; final String file2 = "file2"; final String target = "/target"; dfs.mkdirs(new Path(srcPath)); dfs.mkdirs(new Path(target)); FSDataOutputStream out1 = dfs.create(new Path(srcPath + "/" + file...
@Override public void init(Map<String, String> args) { super.init(args); String inputSrcPath = args.get(FILE_PATH); String[] srcArray = inputSrcPath.split(","); srcPathList = new LinkedList<>(Arrays.asList(srcArray)); if (args.containsKey(DEST_PATH)) { this.targetPath = args.get(DEST_PATH); } }
ConcatFileAction extends HdfsAction { @Override public void init(Map<String, String> args) { super.init(args); String inputSrcPath = args.get(FILE_PATH); String[] srcArray = inputSrcPath.split(","); srcPathList = new LinkedList<>(Arrays.asList(srcArray)); if (args.containsKey(DEST_PATH)) { this.targetPath = args.get(DE...
ConcatFileAction extends HdfsAction { @Override public void init(Map<String, String> args) { super.init(args); String inputSrcPath = args.get(FILE_PATH); String[] srcArray = inputSrcPath.split(","); srcPathList = new LinkedList<>(Arrays.asList(srcArray)); if (args.containsKey(DEST_PATH)) { this.targetPath = args.get(DE...
ConcatFileAction extends HdfsAction { @Override public void init(Map<String, String> args) { super.init(args); String inputSrcPath = args.get(FILE_PATH); String[] srcArray = inputSrcPath.split(","); srcPathList = new LinkedList<>(Arrays.asList(srcArray)); if (args.containsKey(DEST_PATH)) { this.targetPath = args.get(DE...
ConcatFileAction extends HdfsAction { @Override public void init(Map<String, String> args) { super.init(args); String inputSrcPath = args.get(FILE_PATH); String[] srcArray = inputSrcPath.split(","); srcPathList = new LinkedList<>(Arrays.asList(srcArray)); if (args.containsKey(DEST_PATH)) { this.targetPath = args.get(DE...
@Test public void testLocalFileConcat() throws IOException { final String srcPath = "/testConcat"; final String file1 = "file1"; final String file2 = "file2"; final String target = "/target"; dfs.mkdirs(new Path(srcPath)); dfs.mkdirs(new Path(target)); FSDataOutputStream out1 = dfs.create(new Path(srcPath + "/" + file1...
@Override public void init(Map<String, String> args) { super.init(args); String inputSrcPath = args.get(FILE_PATH); String[] srcArray = inputSrcPath.split(","); srcPathList = new LinkedList<>(Arrays.asList(srcArray)); if (args.containsKey(DEST_PATH)) { this.targetPath = args.get(DEST_PATH); } }
ConcatFileAction extends HdfsAction { @Override public void init(Map<String, String> args) { super.init(args); String inputSrcPath = args.get(FILE_PATH); String[] srcArray = inputSrcPath.split(","); srcPathList = new LinkedList<>(Arrays.asList(srcArray)); if (args.containsKey(DEST_PATH)) { this.targetPath = args.get(DE...
ConcatFileAction extends HdfsAction { @Override public void init(Map<String, String> args) { super.init(args); String inputSrcPath = args.get(FILE_PATH); String[] srcArray = inputSrcPath.split(","); srcPathList = new LinkedList<>(Arrays.asList(srcArray)); if (args.containsKey(DEST_PATH)) { this.targetPath = args.get(DE...
ConcatFileAction extends HdfsAction { @Override public void init(Map<String, String> args) { super.init(args); String inputSrcPath = args.get(FILE_PATH); String[] srcArray = inputSrcPath.split(","); srcPathList = new LinkedList<>(Arrays.asList(srcArray)); if (args.containsKey(DEST_PATH)) { this.targetPath = args.get(DE...
ConcatFileAction extends HdfsAction { @Override public void init(Map<String, String> args) { super.init(args); String inputSrcPath = args.get(FILE_PATH); String[] srcArray = inputSrcPath.split(","); srcPathList = new LinkedList<>(Arrays.asList(srcArray)); if (args.containsKey(DEST_PATH)) { this.targetPath = args.get(DE...
@Test public void testUncacheFile() throws Exception { final String file = "/testUncache/file"; Path dir = new Path("/testUncache"); dfs.mkdirs(dir); dfs.setStoragePolicy(dir, "HOT"); final FSDataOutputStream out = dfs.create(new Path(file)); out.writeChars("testUncache"); out.close(); CacheFileAction cacheFileAction =...
@Override public void init(Map<String, String> args) { super.init(args); fileName = args.get(FILE_PATH); }
UncacheFileAction extends HdfsAction { @Override public void init(Map<String, String> args) { super.init(args); fileName = args.get(FILE_PATH); } }
UncacheFileAction extends HdfsAction { @Override public void init(Map<String, String> args) { super.init(args); fileName = args.get(FILE_PATH); } }
UncacheFileAction extends HdfsAction { @Override public void init(Map<String, String> args) { super.init(args); fileName = args.get(FILE_PATH); } @Override void init(Map<String, String> args); }
UncacheFileAction extends HdfsAction { @Override public void init(Map<String, String> args) { super.init(args); fileName = args.get(FILE_PATH); } @Override void init(Map<String, String> args); }
@Test public void testUncacheNoncachedFile() throws Exception { final String file = "/testUncache/file"; Path dir = new Path("/testUncache"); dfs.mkdirs(dir); dfs.setStoragePolicy(dir, "HOT"); final FSDataOutputStream out = dfs.create(new Path(file)); out.writeChars("testUncache"); out.close(); UncacheFileAction uncach...
@Override public void init(Map<String, String> args) { super.init(args); fileName = args.get(FILE_PATH); }
UncacheFileAction extends HdfsAction { @Override public void init(Map<String, String> args) { super.init(args); fileName = args.get(FILE_PATH); } }
UncacheFileAction extends HdfsAction { @Override public void init(Map<String, String> args) { super.init(args); fileName = args.get(FILE_PATH); } }
UncacheFileAction extends HdfsAction { @Override public void init(Map<String, String> args) { super.init(args); fileName = args.get(FILE_PATH); } @Override void init(Map<String, String> args); }
UncacheFileAction extends HdfsAction { @Override public void init(Map<String, String> args) { super.init(args); fileName = args.get(FILE_PATH); } @Override void init(Map<String, String> args); }
@Test public void testNamespaceFetcher() throws IOException, InterruptedException, MissingEventsException, MetaStoreException { final Configuration conf = new SmartConf(); final MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf) .numDataNodes(2).build(); try { final DistributedFileSystem dfs = cluster.getFileSys...
public NamespaceFetcher(DFSClient client, MetaStore metaStore, ScheduledExecutorService service) { this(client, metaStore, DEFAULT_INTERVAL, service, new SmartConf()); }
NamespaceFetcher { public NamespaceFetcher(DFSClient client, MetaStore metaStore, ScheduledExecutorService service) { this(client, metaStore, DEFAULT_INTERVAL, service, new SmartConf()); } }
NamespaceFetcher { public NamespaceFetcher(DFSClient client, MetaStore metaStore, ScheduledExecutorService service) { this(client, metaStore, DEFAULT_INTERVAL, service, new SmartConf()); } NamespaceFetcher(DFSClient client, MetaStore metaStore, ScheduledExecutorService service); NamespaceFetcher(DFSClient client, Meta...
NamespaceFetcher { public NamespaceFetcher(DFSClient client, MetaStore metaStore, ScheduledExecutorService service) { this(client, metaStore, DEFAULT_INTERVAL, service, new SmartConf()); } NamespaceFetcher(DFSClient client, MetaStore metaStore, ScheduledExecutorService service); NamespaceFetcher(DFSClient client, Meta...
NamespaceFetcher { public NamespaceFetcher(DFSClient client, MetaStore metaStore, ScheduledExecutorService service) { this(client, metaStore, DEFAULT_INTERVAL, service, new SmartConf()); } NamespaceFetcher(DFSClient client, MetaStore metaStore, ScheduledExecutorService service); NamespaceFetcher(DFSClient client, Meta...
@Test public void testApplier() throws Exception { DFSClient client = Mockito.mock(DFSClient.class); FileInfo root = HadoopUtil.convertFileStatus(getDummyDirStatus("/", 1000), "/"); metaStore.insertFile(root); BackUpInfo backUpInfo = new BackUpInfo(1L, "/file", "remote/dest/", 10); metaStore.insertBackUpInfo(backUpInfo...
public void apply(List<Event> events) throws IOException, MetaStoreException { List<String> statements = new ArrayList<>(); for (Event event : events) { List<String> gen = getSqlStatement(event); if (gen != null && !gen.isEmpty()){ for (String s : gen) { if (s != null && s.length() > 0) { statements.add(s); } } } } thi...
InotifyEventApplier { public void apply(List<Event> events) throws IOException, MetaStoreException { List<String> statements = new ArrayList<>(); for (Event event : events) { List<String> gen = getSqlStatement(event); if (gen != null && !gen.isEmpty()){ for (String s : gen) { if (s != null && s.length() > 0) { statemen...
InotifyEventApplier { public void apply(List<Event> events) throws IOException, MetaStoreException { List<String> statements = new ArrayList<>(); for (Event event : events) { List<String> gen = getSqlStatement(event); if (gen != null && !gen.isEmpty()){ for (String s : gen) { if (s != null && s.length() > 0) { statemen...
InotifyEventApplier { public void apply(List<Event> events) throws IOException, MetaStoreException { List<String> statements = new ArrayList<>(); for (Event event : events) { List<String> gen = getSqlStatement(event); if (gen != null && !gen.isEmpty()){ for (String s : gen) { if (s != null && s.length() > 0) { statemen...
InotifyEventApplier { public void apply(List<Event> events) throws IOException, MetaStoreException { List<String> statements = new ArrayList<>(); for (Event event : events) { List<String> gen = getSqlStatement(event); if (gen != null && !gen.isEmpty()){ for (String s : gen) { if (s != null && s.length() > 0) { statemen...
@Test public void testRemoteFileList() throws Exception { final String srcPath = "/testList"; final String file1 = "file1"; final String file2 = "file2"; final String dir = "/childDir"; final String dirFile1 = "childDirFile1"; dfs.mkdirs(new Path(srcPath)); dfs.mkdirs(new Path(srcPath + dir)); FSDataOutputStream out1 =...
@Override public void init(Map<String, String> args) { super.init(args); this.srcPath = args.get(FILE_PATH); }
ListFileAction extends HdfsAction { @Override public void init(Map<String, String> args) { super.init(args); this.srcPath = args.get(FILE_PATH); } }
ListFileAction extends HdfsAction { @Override public void init(Map<String, String> args) { super.init(args); this.srcPath = args.get(FILE_PATH); } }
ListFileAction extends HdfsAction { @Override public void init(Map<String, String> args) { super.init(args); this.srcPath = args.get(FILE_PATH); } @Override void init(Map<String, String> args); }
ListFileAction extends HdfsAction { @Override public void init(Map<String, String> args) { super.init(args); this.srcPath = args.get(FILE_PATH); } @Override void init(Map<String, String> args); }
@Test public void testApplierCreateEvent() throws Exception { DFSClient client = Mockito.mock(DFSClient.class); InotifyEventApplier applier = new InotifyEventApplier(metaStore, client); BackUpInfo backUpInfo = new BackUpInfo(1L, "/file1", "remote/dest/", 10); metaStore.insertBackUpInfo(backUpInfo); HdfsFileStatus statu...
public void apply(List<Event> events) throws IOException, MetaStoreException { List<String> statements = new ArrayList<>(); for (Event event : events) { List<String> gen = getSqlStatement(event); if (gen != null && !gen.isEmpty()){ for (String s : gen) { if (s != null && s.length() > 0) { statements.add(s); } } } } thi...
InotifyEventApplier { public void apply(List<Event> events) throws IOException, MetaStoreException { List<String> statements = new ArrayList<>(); for (Event event : events) { List<String> gen = getSqlStatement(event); if (gen != null && !gen.isEmpty()){ for (String s : gen) { if (s != null && s.length() > 0) { statemen...
InotifyEventApplier { public void apply(List<Event> events) throws IOException, MetaStoreException { List<String> statements = new ArrayList<>(); for (Event event : events) { List<String> gen = getSqlStatement(event); if (gen != null && !gen.isEmpty()){ for (String s : gen) { if (s != null && s.length() > 0) { statemen...
InotifyEventApplier { public void apply(List<Event> events) throws IOException, MetaStoreException { List<String> statements = new ArrayList<>(); for (Event event : events) { List<String> gen = getSqlStatement(event); if (gen != null && !gen.isEmpty()){ for (String s : gen) { if (s != null && s.length() > 0) { statemen...
InotifyEventApplier { public void apply(List<Event> events) throws IOException, MetaStoreException { List<String> statements = new ArrayList<>(); for (Event event : events) { List<String> gen = getSqlStatement(event); if (gen != null && !gen.isEmpty()){ for (String s : gen) { if (s != null && s.length() > 0) { statemen...
@Test public void testApplierRenameEvent() throws Exception { DFSClient client = Mockito.mock(DFSClient.class); InotifyEventApplier applier = new InotifyEventApplier(metaStore, client); FileInfo[] fileInfos = new FileInfo[]{ HadoopUtil.convertFileStatus(getDummyFileStatus("/dirfile", 7000), "/dirfile"), HadoopUtil.conv...
public void apply(List<Event> events) throws IOException, MetaStoreException { List<String> statements = new ArrayList<>(); for (Event event : events) { List<String> gen = getSqlStatement(event); if (gen != null && !gen.isEmpty()){ for (String s : gen) { if (s != null && s.length() > 0) { statements.add(s); } } } } thi...
InotifyEventApplier { public void apply(List<Event> events) throws IOException, MetaStoreException { List<String> statements = new ArrayList<>(); for (Event event : events) { List<String> gen = getSqlStatement(event); if (gen != null && !gen.isEmpty()){ for (String s : gen) { if (s != null && s.length() > 0) { statemen...
InotifyEventApplier { public void apply(List<Event> events) throws IOException, MetaStoreException { List<String> statements = new ArrayList<>(); for (Event event : events) { List<String> gen = getSqlStatement(event); if (gen != null && !gen.isEmpty()){ for (String s : gen) { if (s != null && s.length() > 0) { statemen...
InotifyEventApplier { public void apply(List<Event> events) throws IOException, MetaStoreException { List<String> statements = new ArrayList<>(); for (Event event : events) { List<String> gen = getSqlStatement(event); if (gen != null && !gen.isEmpty()){ for (String s : gen) { if (s != null && s.length() > 0) { statemen...
InotifyEventApplier { public void apply(List<Event> events) throws IOException, MetaStoreException { List<String> statements = new ArrayList<>(); for (Event event : events) { List<String> gen = getSqlStatement(event); if (gen != null && !gen.isEmpty()){ for (String s : gen) { if (s != null && s.length() > 0) { statemen...
@Test public void testLocalFileList() throws Exception { final String srcPath = "/testList"; final String file1 = "file1"; final String file2 = "file2"; final String dir = "/childDir"; final String dirFile1 = "childDirFile1"; dfs.mkdirs(new Path(srcPath)); dfs.mkdirs(new Path(srcPath + dir)); FSDataOutputStream out1 = ...
@Override public void init(Map<String, String> args) { super.init(args); this.srcPath = args.get(FILE_PATH); }
ListFileAction extends HdfsAction { @Override public void init(Map<String, String> args) { super.init(args); this.srcPath = args.get(FILE_PATH); } }
ListFileAction extends HdfsAction { @Override public void init(Map<String, String> args) { super.init(args); this.srcPath = args.get(FILE_PATH); } }
ListFileAction extends HdfsAction { @Override public void init(Map<String, String> args) { super.init(args); this.srcPath = args.get(FILE_PATH); } @Override void init(Map<String, String> args); }
ListFileAction extends HdfsAction { @Override public void init(Map<String, String> args) { super.init(args); this.srcPath = args.get(FILE_PATH); } @Override void init(Map<String, String> args); }
@Test public void testEquals() throws Exception { FileInfo fileInfo = new FileInfo(" ", 1, 1, true, (short) 1, 1, 1, 1, (short) 1, " ", " ", (byte) 1); Assert.assertEquals(true, fileInfo.equals(fileInfo)); FileInfo fileInfo1 = new FileInfo(" ", 1, 1, true, (short) 1, 1, 1, 1, (short) 1, " ", " ", (byte) 1); Assert.asse...
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } FileInfo fileInfo = (FileInfo) o; return fileId == fileInfo.fileId && length == fileInfo.length && isdir == fileInfo.isdir && blockReplication == fileInfo.blockReplication && blocks...
FileInfo { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } FileInfo fileInfo = (FileInfo) o; return fileId == fileInfo.fileId && length == fileInfo.length && isdir == fileInfo.isdir && blockReplication == fileInfo.blockReplicatio...
FileInfo { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } FileInfo fileInfo = (FileInfo) o; return fileId == fileInfo.fileId && length == fileInfo.length && isdir == fileInfo.isdir && blockReplication == fileInfo.blockReplicatio...
FileInfo { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } FileInfo fileInfo = (FileInfo) o; return fileId == fileInfo.fileId && length == fileInfo.length && isdir == fileInfo.isdir && blockReplication == fileInfo.blockReplicatio...
FileInfo { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } FileInfo fileInfo = (FileInfo) o; return fileId == fileInfo.fileId && length == fileInfo.length && isdir == fileInfo.isdir && blockReplication == fileInfo.blockReplicatio...
@Test public void testCmdletString() throws Exception { Map<String, Integer> strs = new HashMap<>(); strs.put("int a b -c d -e f \"gg ' kk ' ff\" \" mn \"", 9); strs.put("cat /dir/file ", 2); List<String> items; for (String str : strs.keySet()) { items = StringUtil.parseCmdletString(str); Assert.assertTrue(strs.get(str...
public static List<String> parseCmdletString(String cmdlet) throws ParseException { if (cmdlet == null || cmdlet.length() == 0) { return new ArrayList<>(); } char[] chars = (cmdlet + " ").toCharArray(); List<String> blocks = new ArrayList<String>(); char c; char[] token = new char[chars.length]; int tokenlen = 0; boole...
StringUtil { public static List<String> parseCmdletString(String cmdlet) throws ParseException { if (cmdlet == null || cmdlet.length() == 0) { return new ArrayList<>(); } char[] chars = (cmdlet + " ").toCharArray(); List<String> blocks = new ArrayList<String>(); char c; char[] token = new char[chars.length]; int tokenl...
StringUtil { public static List<String> parseCmdletString(String cmdlet) throws ParseException { if (cmdlet == null || cmdlet.length() == 0) { return new ArrayList<>(); } char[] chars = (cmdlet + " ").toCharArray(); List<String> blocks = new ArrayList<String>(); char c; char[] token = new char[chars.length]; int tokenl...
StringUtil { public static List<String> parseCmdletString(String cmdlet) throws ParseException { if (cmdlet == null || cmdlet.length() == 0) { return new ArrayList<>(); } char[] chars = (cmdlet + " ").toCharArray(); List<String> blocks = new ArrayList<String>(); char c; char[] token = new char[chars.length]; int tokenl...
StringUtil { public static List<String> parseCmdletString(String cmdlet) throws ParseException { if (cmdlet == null || cmdlet.length() == 0) { return new ArrayList<>(); } char[] chars = (cmdlet + " ").toCharArray(); List<String> blocks = new ArrayList<String>(); char c; char[] token = new char[chars.length]; int tokenl...
@Test public void loginUsingKeytab() throws Exception { File keytabFile = generateKeytab(keytabFileName, principal); Subject subject = SecurityUtil.loginUsingKeytab(principal, keytabFile); Assert.assertEquals(principal, subject.getPrincipals().iterator().next().getName()); System.out.println("Login successful for user:...
public static void loginUsingKeytab(SmartConf conf) throws IOException{ String keytabFilename = conf.get(SmartConfKeys.SMART_SERVER_KEYTAB_FILE_KEY); if (keytabFilename == null || keytabFilename.length() == 0) { throw new IOException("Running in secure mode, but config doesn't have a keytab"); } File keytabPath = new F...
SecurityUtil { public static void loginUsingKeytab(SmartConf conf) throws IOException{ String keytabFilename = conf.get(SmartConfKeys.SMART_SERVER_KEYTAB_FILE_KEY); if (keytabFilename == null || keytabFilename.length() == 0) { throw new IOException("Running in secure mode, but config doesn't have a keytab"); } File key...
SecurityUtil { public static void loginUsingKeytab(SmartConf conf) throws IOException{ String keytabFilename = conf.get(SmartConfKeys.SMART_SERVER_KEYTAB_FILE_KEY); if (keytabFilename == null || keytabFilename.length() == 0) { throw new IOException("Running in secure mode, but config doesn't have a keytab"); } File key...
SecurityUtil { public static void loginUsingKeytab(SmartConf conf) throws IOException{ String keytabFilename = conf.get(SmartConfKeys.SMART_SERVER_KEYTAB_FILE_KEY); if (keytabFilename == null || keytabFilename.length() == 0) { throw new IOException("Running in secure mode, but config doesn't have a keytab"); } File key...
SecurityUtil { public static void loginUsingKeytab(SmartConf conf) throws IOException{ String keytabFilename = conf.get(SmartConfKeys.SMART_SERVER_KEYTAB_FILE_KEY); if (keytabFilename == null || keytabFilename.length() == 0) { throw new IOException("Running in secure mode, but config doesn't have a keytab"); } File key...
@Test public void testExtractData() { CustomerOrderExtractor extractor = new CustomerOrderExtractor(); PayloadWrapper<CustomerOrderPayload> payloadWrapper = new PayloadWrapper<CustomerOrderPayload>(null); assertThat(extractor.extractData(payloadWrapper)).isNull(); Date orderDate = new Date(); List<String> items = Array...
@Override public CustomerOrder extractData(PayloadWrapper<CustomerOrderPayload> payloadWrapper) { CustomerOrder value = null; if (payloadWrapper.hasPayload()) { value = new CustomerOrder(); CustomerOrderPayload payload = payloadWrapper.getPayload(); value.setCustomerId(payload.getCustomerId()); value.setShippingAddress...
CustomerOrderExtractor implements PayloadWrapperExtractor<CustomerOrderPayload, CustomerOrder> { @Override public CustomerOrder extractData(PayloadWrapper<CustomerOrderPayload> payloadWrapper) { CustomerOrder value = null; if (payloadWrapper.hasPayload()) { value = new CustomerOrder(); CustomerOrderPayload payload = pa...
CustomerOrderExtractor implements PayloadWrapperExtractor<CustomerOrderPayload, CustomerOrder> { @Override public CustomerOrder extractData(PayloadWrapper<CustomerOrderPayload> payloadWrapper) { CustomerOrder value = null; if (payloadWrapper.hasPayload()) { value = new CustomerOrder(); CustomerOrderPayload payload = pa...
CustomerOrderExtractor implements PayloadWrapperExtractor<CustomerOrderPayload, CustomerOrder> { @Override public CustomerOrder extractData(PayloadWrapper<CustomerOrderPayload> payloadWrapper) { CustomerOrder value = null; if (payloadWrapper.hasPayload()) { value = new CustomerOrder(); CustomerOrderPayload payload = pa...
CustomerOrderExtractor implements PayloadWrapperExtractor<CustomerOrderPayload, CustomerOrder> { @Override public CustomerOrder extractData(PayloadWrapper<CustomerOrderPayload> payloadWrapper) { CustomerOrder value = null; if (payloadWrapper.hasPayload()) { value = new CustomerOrder(); CustomerOrderPayload payload = pa...
@Test public void testExtractData() { ItemExtractor extractor = new ItemExtractor(); PayloadWrapper<ItemPayload> payloadWrapper = new PayloadWrapper<ItemPayload>(null); assertThat(extractor.extractData(payloadWrapper)).isNull(); ItemPayload payload = new ItemPayload(); payload.setId("id"); payload.setName("name"); payl...
@Override public Item extractData(PayloadWrapper<ItemPayload> payloadWrapper) { Item value = null; if (payloadWrapper.hasPayload()) { value = new Item(); ItemPayload payload = payloadWrapper.getPayload(); value.setName(payload.getName()); value.setDescription(payload.getDescription()); value.setPrice(payload.getPrice()...
ItemExtractor implements PayloadWrapperExtractor<ItemPayload, Item> { @Override public Item extractData(PayloadWrapper<ItemPayload> payloadWrapper) { Item value = null; if (payloadWrapper.hasPayload()) { value = new Item(); ItemPayload payload = payloadWrapper.getPayload(); value.setName(payload.getName()); value.setDe...
ItemExtractor implements PayloadWrapperExtractor<ItemPayload, Item> { @Override public Item extractData(PayloadWrapper<ItemPayload> payloadWrapper) { Item value = null; if (payloadWrapper.hasPayload()) { value = new Item(); ItemPayload payload = payloadWrapper.getPayload(); value.setName(payload.getName()); value.setDe...
ItemExtractor implements PayloadWrapperExtractor<ItemPayload, Item> { @Override public Item extractData(PayloadWrapper<ItemPayload> payloadWrapper) { Item value = null; if (payloadWrapper.hasPayload()) { value = new Item(); ItemPayload payload = payloadWrapper.getPayload(); value.setName(payload.getName()); value.setDe...
ItemExtractor implements PayloadWrapperExtractor<ItemPayload, Item> { @Override public Item extractData(PayloadWrapper<ItemPayload> payloadWrapper) { Item value = null; if (payloadWrapper.hasPayload()) { value = new Item(); ItemPayload payload = payloadWrapper.getPayload(); value.setName(payload.getName()); value.setDe...
@Test public void testExtractData() { CustomerExtractor extractor = new CustomerExtractor(); PayloadWrapper<CustomerPayload> payloadWrapper = new PayloadWrapper<CustomerPayload>(null); assertThat(extractor.extractData(payloadWrapper)).isNull(); CustomerPayload payload = new CustomerPayload(); payload.setId("id"); paylo...
@Override public Customer extractData(PayloadWrapper<CustomerPayload> payloadWrapper) { Customer value = null; if (payloadWrapper.hasPayload()) { value = new Customer(); CustomerPayload payload = payloadWrapper.getPayload(); value.setName(payload.getName()); } return value; }
CustomerExtractor implements PayloadWrapperExtractor<CustomerPayload, Customer> { @Override public Customer extractData(PayloadWrapper<CustomerPayload> payloadWrapper) { Customer value = null; if (payloadWrapper.hasPayload()) { value = new Customer(); CustomerPayload payload = payloadWrapper.getPayload(); value.setName...
CustomerExtractor implements PayloadWrapperExtractor<CustomerPayload, Customer> { @Override public Customer extractData(PayloadWrapper<CustomerPayload> payloadWrapper) { Customer value = null; if (payloadWrapper.hasPayload()) { value = new Customer(); CustomerPayload payload = payloadWrapper.getPayload(); value.setName...
CustomerExtractor implements PayloadWrapperExtractor<CustomerPayload, Customer> { @Override public Customer extractData(PayloadWrapper<CustomerPayload> payloadWrapper) { Customer value = null; if (payloadWrapper.hasPayload()) { value = new Customer(); CustomerPayload payload = payloadWrapper.getPayload(); value.setName...
CustomerExtractor implements PayloadWrapperExtractor<CustomerPayload, Customer> { @Override public Customer extractData(PayloadWrapper<CustomerPayload> payloadWrapper) { Customer value = null; if (payloadWrapper.hasPayload()) { value = new Customer(); CustomerPayload payload = payloadWrapper.getPayload(); value.setName...
@Test public void testExtractData() throws SQLException { ItemResultSetExtractor extractor = new ItemResultSetExtractor(); ResultSet rs = mock(ResultSet.class); given(rs.next()).willReturn(true).willReturn(false); given(rs.getString("ID")).willReturn("item1"); given(rs.getString("NAME")).willReturn("item name"); given(...
@Override public PayloadWrapper<ItemPayload> extractData(ResultSet rs) throws SQLException, DataAccessException { ItemPayload itemPayload = null; if (rs.next()) { itemPayload = new ItemPayload(); itemPayload.setId(rs.getString("ID")); itemPayload.setName(rs.getString("NAME")); itemPayload.setPrice(rs.getBigDecimal("PRI...
ItemResultSetExtractor implements ResultSetExtractor<PayloadWrapper<ItemPayload>> { @Override public PayloadWrapper<ItemPayload> extractData(ResultSet rs) throws SQLException, DataAccessException { ItemPayload itemPayload = null; if (rs.next()) { itemPayload = new ItemPayload(); itemPayload.setId(rs.getString("ID")); i...
ItemResultSetExtractor implements ResultSetExtractor<PayloadWrapper<ItemPayload>> { @Override public PayloadWrapper<ItemPayload> extractData(ResultSet rs) throws SQLException, DataAccessException { ItemPayload itemPayload = null; if (rs.next()) { itemPayload = new ItemPayload(); itemPayload.setId(rs.getString("ID")); i...
ItemResultSetExtractor implements ResultSetExtractor<PayloadWrapper<ItemPayload>> { @Override public PayloadWrapper<ItemPayload> extractData(ResultSet rs) throws SQLException, DataAccessException { ItemPayload itemPayload = null; if (rs.next()) { itemPayload = new ItemPayload(); itemPayload.setId(rs.getString("ID")); i...
ItemResultSetExtractor implements ResultSetExtractor<PayloadWrapper<ItemPayload>> { @Override public PayloadWrapper<ItemPayload> extractData(ResultSet rs) throws SQLException, DataAccessException { ItemPayload itemPayload = null; if (rs.next()) { itemPayload = new ItemPayload(); itemPayload.setId(rs.getString("ID")); i...
@Test public void testExtractData() throws DataAccessException, SQLException { CustomerResultSetExtractor extractor = new CustomerResultSetExtractor(); ResultSet rs = mock(ResultSet.class); given(rs.next()).willReturn(true).willReturn(false); given(rs.getString("ID")).willReturn("customer1"); given(rs.getString("NAME")...
@Override public PayloadWrapper<CustomerPayload> extractData(ResultSet rs) throws SQLException, DataAccessException { CustomerPayload customerPayload = null; if (rs.next()) { customerPayload = new CustomerPayload(); customerPayload.setId(rs.getString("ID")); customerPayload.setName(rs.getString("NAME")); } return new P...
CustomerResultSetExtractor implements ResultSetExtractor<PayloadWrapper<CustomerPayload>> { @Override public PayloadWrapper<CustomerPayload> extractData(ResultSet rs) throws SQLException, DataAccessException { CustomerPayload customerPayload = null; if (rs.next()) { customerPayload = new CustomerPayload(); customerPayl...
CustomerResultSetExtractor implements ResultSetExtractor<PayloadWrapper<CustomerPayload>> { @Override public PayloadWrapper<CustomerPayload> extractData(ResultSet rs) throws SQLException, DataAccessException { CustomerPayload customerPayload = null; if (rs.next()) { customerPayload = new CustomerPayload(); customerPayl...
CustomerResultSetExtractor implements ResultSetExtractor<PayloadWrapper<CustomerPayload>> { @Override public PayloadWrapper<CustomerPayload> extractData(ResultSet rs) throws SQLException, DataAccessException { CustomerPayload customerPayload = null; if (rs.next()) { customerPayload = new CustomerPayload(); customerPayl...
CustomerResultSetExtractor implements ResultSetExtractor<PayloadWrapper<CustomerPayload>> { @Override public PayloadWrapper<CustomerPayload> extractData(ResultSet rs) throws SQLException, DataAccessException { CustomerPayload customerPayload = null; if (rs.next()) { customerPayload = new CustomerPayload(); customerPayl...
@Test public void testExtractData() throws DataAccessException, SQLException { Date orderDate = new Date(12345L); List<String> items = Arrays.asList("item1", "item2"); CustomerOrderResultSetExtractor extractor = new CustomerOrderResultSetExtractor(); ResultSet rs = mock(ResultSet.class); given(rs.next()).willReturn(tru...
@Override public PayloadWrapper<CustomerOrderPayload> extractData(ResultSet rs) throws SQLException, DataAccessException { CustomerOrderPayload result = null; while (rs.next()) { if (result == null) { result = new CustomerOrderPayload(); result.setId(rs.getString("ID")); result.setCustomerId(rs.getString("CUSTOMER_ID")...
CustomerOrderResultSetExtractor implements ResultSetExtractor<PayloadWrapper<CustomerOrderPayload>> { @Override public PayloadWrapper<CustomerOrderPayload> extractData(ResultSet rs) throws SQLException, DataAccessException { CustomerOrderPayload result = null; while (rs.next()) { if (result == null) { result = new Cust...
CustomerOrderResultSetExtractor implements ResultSetExtractor<PayloadWrapper<CustomerOrderPayload>> { @Override public PayloadWrapper<CustomerOrderPayload> extractData(ResultSet rs) throws SQLException, DataAccessException { CustomerOrderPayload result = null; while (rs.next()) { if (result == null) { result = new Cust...
CustomerOrderResultSetExtractor implements ResultSetExtractor<PayloadWrapper<CustomerOrderPayload>> { @Override public PayloadWrapper<CustomerOrderPayload> extractData(ResultSet rs) throws SQLException, DataAccessException { CustomerOrderPayload result = null; while (rs.next()) { if (result == null) { result = new Cust...
CustomerOrderResultSetExtractor implements ResultSetExtractor<PayloadWrapper<CustomerOrderPayload>> { @Override public PayloadWrapper<CustomerOrderPayload> extractData(ResultSet rs) throws SQLException, DataAccessException { CustomerOrderPayload result = null; while (rs.next()) { if (result == null) { result = new Cust...
@Test @SuppressWarnings({ "rawtypes", "unchecked" }) public void testOutput() { List<Message<PayloadWrapper>> messages = new ArrayList<>(); Message<PayloadWrapper> message1 = MessageBuilder .withPayload(new PayloadWrapper(new Object())) .setHeader("srcGroup", "foo") .setHeader("srcKey", "key1") .build(); messages.add(m...
@Aggregator public GeodeDataWrapper output(List<Message<PayloadWrapper>> messages) { GeodeDataWrapper geodeDataWrapper = new GeodeDataWrapper(); for (Message<PayloadWrapper> message : messages) { String geodeRegionName = (String) message.getHeaders().get("srcGroup"); Object geodeKey = message.getHeaders().get("srcKey")...
GeodeMessageAggregator { @Aggregator public GeodeDataWrapper output(List<Message<PayloadWrapper>> messages) { GeodeDataWrapper geodeDataWrapper = new GeodeDataWrapper(); for (Message<PayloadWrapper> message : messages) { String geodeRegionName = (String) message.getHeaders().get("srcGroup"); Object geodeKey = message.g...
GeodeMessageAggregator { @Aggregator public GeodeDataWrapper output(List<Message<PayloadWrapper>> messages) { GeodeDataWrapper geodeDataWrapper = new GeodeDataWrapper(); for (Message<PayloadWrapper> message : messages) { String geodeRegionName = (String) message.getHeaders().get("srcGroup"); Object geodeKey = message.g...
GeodeMessageAggregator { @Aggregator public GeodeDataWrapper output(List<Message<PayloadWrapper>> messages) { GeodeDataWrapper geodeDataWrapper = new GeodeDataWrapper(); for (Message<PayloadWrapper> message : messages) { String geodeRegionName = (String) message.getHeaders().get("srcGroup"); Object geodeKey = message.g...
GeodeMessageAggregator { @Aggregator public GeodeDataWrapper output(List<Message<PayloadWrapper>> messages) { GeodeDataWrapper geodeDataWrapper = new GeodeDataWrapper(); for (Message<PayloadWrapper> message : messages) { String geodeRegionName = (String) message.getHeaders().get("srcGroup"); Object geodeKey = message.g...
@Test public void testCorrelation() { Message<PayloadWrapper<Object>> message = MessageBuilder .withPayload(new PayloadWrapper<Object>(new Object())) .setHeader("srcGroup", "foo") .setHeader("srcKey", "key1") .build(); String expectedResult = "[foo],[" + Math.floorMod("key1".hashCode(), groupCount) + "]"; assertThat(ge...
@CorrelationStrategy public String correlation(Message<?> message) { int hashCode = message.getHeaders().get("srcKey").hashCode(); int divisor = groupCount; return "[" + (String) message.getHeaders().get("srcGroup") + "]" + ",[" + Math.floorMod(hashCode, divisor) + "]"; }
GeodeMessageAggregator { @CorrelationStrategy public String correlation(Message<?> message) { int hashCode = message.getHeaders().get("srcKey").hashCode(); int divisor = groupCount; return "[" + (String) message.getHeaders().get("srcGroup") + "]" + ",[" + Math.floorMod(hashCode, divisor) + "]"; } }
GeodeMessageAggregator { @CorrelationStrategy public String correlation(Message<?> message) { int hashCode = message.getHeaders().get("srcKey").hashCode(); int divisor = groupCount; return "[" + (String) message.getHeaders().get("srcGroup") + "]" + ",[" + Math.floorMod(hashCode, divisor) + "]"; } GeodeMessageAggregator...
GeodeMessageAggregator { @CorrelationStrategy public String correlation(Message<?> message) { int hashCode = message.getHeaders().get("srcKey").hashCode(); int divisor = groupCount; return "[" + (String) message.getHeaders().get("srcGroup") + "]" + ",[" + Math.floorMod(hashCode, divisor) + "]"; } GeodeMessageAggregator...
GeodeMessageAggregator { @CorrelationStrategy public String correlation(Message<?> message) { int hashCode = message.getHeaders().get("srcKey").hashCode(); int divisor = groupCount; return "[" + (String) message.getHeaders().get("srcGroup") + "]" + ",[" + Math.floorMod(hashCode, divisor) + "]"; } GeodeMessageAggregator...
@Test public void testCanMessagesBeReleased() { List<Message<?>> messages = new ArrayList<>(); Message<PayloadWrapper<Object>> message1 = MessageBuilder .withPayload(new PayloadWrapper<Object>(null)) .setHeader("srcGroup", "foo") .setHeader("srcKey", "key1") .build(); messages.add(message1); assertThat(geodeMessageAggr...
@ReleaseStrategy public boolean canMessagesBeReleased(List<Message<?>> messages) { return messages.size() >= batchSize; }
GeodeMessageAggregator { @ReleaseStrategy public boolean canMessagesBeReleased(List<Message<?>> messages) { return messages.size() >= batchSize; } }
GeodeMessageAggregator { @ReleaseStrategy public boolean canMessagesBeReleased(List<Message<?>> messages) { return messages.size() >= batchSize; } GeodeMessageAggregator(ApplicationContext context, int groupCount, int batchSize); }
GeodeMessageAggregator { @ReleaseStrategy public boolean canMessagesBeReleased(List<Message<?>> messages) { return messages.size() >= batchSize; } GeodeMessageAggregator(ApplicationContext context, int groupCount, int batchSize); @Aggregator GeodeDataWrapper output(List<Message<PayloadWrapper>> messages); @CorrelationS...
GeodeMessageAggregator { @ReleaseStrategy public boolean canMessagesBeReleased(List<Message<?>> messages) { return messages.size() >= batchSize; } GeodeMessageAggregator(ApplicationContext context, int groupCount, int batchSize); @Aggregator GeodeDataWrapper output(List<Message<PayloadWrapper>> messages); @CorrelationS...
@Test @SuppressWarnings({ "rawtypes", "unchecked" }) public void testHandleMessage() { GeodeDataWrapper geodeDataWrapper = new GeodeDataWrapper(); geodeDataWrapper.getDataMapForPut().put("key1", "value1"); geodeDataWrapper.getDataMapForPut().put("key2", "value2"); geodeDataWrapper.getKeySetForRemove().add("key1"); Mess...
public void handleMessage(Message<GeodeDataWrapper> message) { MessageHeaders headers = message.getHeaders(); GeodeDataWrapper payload = message.getPayload(); String regionName = (String) headers.get("srcGroup"); Region<Object, Object> region = clientCache.getRegion(regionName); region.putAll(payload.getDataMapForPut()...
GeodeMessageHandler { public void handleMessage(Message<GeodeDataWrapper> message) { MessageHeaders headers = message.getHeaders(); GeodeDataWrapper payload = message.getPayload(); String regionName = (String) headers.get("srcGroup"); Region<Object, Object> region = clientCache.getRegion(regionName); region.putAll(payl...
GeodeMessageHandler { public void handleMessage(Message<GeodeDataWrapper> message) { MessageHeaders headers = message.getHeaders(); GeodeDataWrapper payload = message.getPayload(); String regionName = (String) headers.get("srcGroup"); Region<Object, Object> region = clientCache.getRegion(regionName); region.putAll(payl...
GeodeMessageHandler { public void handleMessage(Message<GeodeDataWrapper> message) { MessageHeaders headers = message.getHeaders(); GeodeDataWrapper payload = message.getPayload(); String regionName = (String) headers.get("srcGroup"); Region<Object, Object> region = clientCache.getRegion(regionName); region.putAll(payl...
GeodeMessageHandler { public void handleMessage(Message<GeodeDataWrapper> message) { MessageHeaders headers = message.getHeaders(); GeodeDataWrapper payload = message.getPayload(); String regionName = (String) headers.get("srcGroup"); Region<Object, Object> region = clientCache.getRegion(regionName); region.putAll(payl...
@Test public void accountInfo() throws Exception { Account info = api.accountInfo(); assert info.country != null : "No country for account"; assert info.displayName != null : "No displayName for account"; assert info.quota > 0 : "0 quota in account"; assert info.quotaNormal > 0 : "0 normal quota in account"; assert inf...
public Account accountInfo() throws DropboxException { assertAuthenticated(); @SuppressWarnings("unchecked") Map<String, Object> accountInfo = (Map<String, Object>) RESTUtility.request(RequestMethod.GET, session.getAPIServer(), "/account/info", VERSION, new String[] {"locale", session.getLocale().toString()}, session);...
DropboxAPI { public Account accountInfo() throws DropboxException { assertAuthenticated(); @SuppressWarnings("unchecked") Map<String, Object> accountInfo = (Map<String, Object>) RESTUtility.request(RequestMethod.GET, session.getAPIServer(), "/account/info", VERSION, new String[] {"locale", session.getLocale().toString(...
DropboxAPI { public Account accountInfo() throws DropboxException { assertAuthenticated(); @SuppressWarnings("unchecked") Map<String, Object> accountInfo = (Map<String, Object>) RESTUtility.request(RequestMethod.GET, session.getAPIServer(), "/account/info", VERSION, new String[] {"locale", session.getLocale().toString(...
DropboxAPI { public Account accountInfo() throws DropboxException { assertAuthenticated(); @SuppressWarnings("unchecked") Map<String, Object> accountInfo = (Map<String, Object>) RESTUtility.request(RequestMethod.GET, session.getAPIServer(), "/account/info", VERSION, new String[] {"locale", session.getLocale().toString(...
DropboxAPI { public Account accountInfo() throws DropboxException { assertAuthenticated(); @SuppressWarnings("unchecked") Map<String, Object> accountInfo = (Map<String, Object>) RESTUtility.request(RequestMethod.GET, session.getAPIServer(), "/account/info", VERSION, new String[] {"locale", session.getLocale().toString(...
@Test public void copy() throws Exception { String fromPath = TESTS_DIR + "/copyFrom.jpg"; String toPath = TESTS_DIR + "/copyTo.jpg"; uploadFile(frog, fromPath); Entry ent = api.copy(fromPath, toPath); assertFile(ent, frog, toPath); ent = api.metadata(toPath, 1, null, false, null); assertFile(ent, frog, toPath); }
public Entry copy(String fromPath, String toPath) throws DropboxException { assertAuthenticated(); String[] params = {"root", session.getAccessType().toString(), "from_path", fromPath, "to_path", toPath, "locale", session.getLocale().toString()}; @SuppressWarnings("unchecked") Map<String, Object> resp = (Map<String, Ob...
DropboxAPI { public Entry copy(String fromPath, String toPath) throws DropboxException { assertAuthenticated(); String[] params = {"root", session.getAccessType().toString(), "from_path", fromPath, "to_path", toPath, "locale", session.getLocale().toString()}; @SuppressWarnings("unchecked") Map<String, Object> resp = (M...
DropboxAPI { public Entry copy(String fromPath, String toPath) throws DropboxException { assertAuthenticated(); String[] params = {"root", session.getAccessType().toString(), "from_path", fromPath, "to_path", toPath, "locale", session.getLocale().toString()}; @SuppressWarnings("unchecked") Map<String, Object> resp = (M...
DropboxAPI { public Entry copy(String fromPath, String toPath) throws DropboxException { assertAuthenticated(); String[] params = {"root", session.getAccessType().toString(), "from_path", fromPath, "to_path", toPath, "locale", session.getLocale().toString()}; @SuppressWarnings("unchecked") Map<String, Object> resp = (M...
DropboxAPI { public Entry copy(String fromPath, String toPath) throws DropboxException { assertAuthenticated(); String[] params = {"root", session.getAccessType().toString(), "from_path", fromPath, "to_path", toPath, "locale", session.getLocale().toString()}; @SuppressWarnings("unchecked") Map<String, Object> resp = (M...
@Test public void move() throws Exception { String fromPath = TESTS_DIR + "/moveFrom.jpg"; String toPath = TESTS_DIR + "/moveTo.jpg"; uploadFile(frog, fromPath); Entry moveEnt = api.move(fromPath, toPath); assertFile(moveEnt, frog, toPath); moveEnt = api.metadata(toPath, 1, null, false, null); assertFile(moveEnt, frog,...
public Entry move(String fromPath, String toPath) throws DropboxException { assertAuthenticated(); String[] params = {"root", session.getAccessType().toString(), "from_path", fromPath, "to_path", toPath, "locale", session.getLocale().toString()}; @SuppressWarnings("unchecked") Map<String, Object> resp = (Map<String, Ob...
DropboxAPI { public Entry move(String fromPath, String toPath) throws DropboxException { assertAuthenticated(); String[] params = {"root", session.getAccessType().toString(), "from_path", fromPath, "to_path", toPath, "locale", session.getLocale().toString()}; @SuppressWarnings("unchecked") Map<String, Object> resp = (M...
DropboxAPI { public Entry move(String fromPath, String toPath) throws DropboxException { assertAuthenticated(); String[] params = {"root", session.getAccessType().toString(), "from_path", fromPath, "to_path", toPath, "locale", session.getLocale().toString()}; @SuppressWarnings("unchecked") Map<String, Object> resp = (M...
DropboxAPI { public Entry move(String fromPath, String toPath) throws DropboxException { assertAuthenticated(); String[] params = {"root", session.getAccessType().toString(), "from_path", fromPath, "to_path", toPath, "locale", session.getLocale().toString()}; @SuppressWarnings("unchecked") Map<String, Object> resp = (M...
DropboxAPI { public Entry move(String fromPath, String toPath) throws DropboxException { assertAuthenticated(); String[] params = {"root", session.getAccessType().toString(), "from_path", fromPath, "to_path", toPath, "locale", session.getLocale().toString()}; @SuppressWarnings("unchecked") Map<String, Object> resp = (M...
@Test public void media() throws Exception { String path = TESTS_DIR + "/dropbox_song.mp3"; uploadFile(song, path); DropboxLink link = api.media(path, true); assert link.url != null : "No url for streamed file"; link = api.media(path, false); assert link.url != null : "No insecure url for streamed file"; }
public DropboxLink media(String path, boolean ssl) throws DropboxException { assertAuthenticated(); String target = "/media/" + session.getAccessType() + path; @SuppressWarnings("unchecked") Map<String, Object> map = (Map<String, Object>)RESTUtility.request(RequestMethod.GET, session.getAPIServer(), target, VERSION, ne...
DropboxAPI { public DropboxLink media(String path, boolean ssl) throws DropboxException { assertAuthenticated(); String target = "/media/" + session.getAccessType() + path; @SuppressWarnings("unchecked") Map<String, Object> map = (Map<String, Object>)RESTUtility.request(RequestMethod.GET, session.getAPIServer(), target...
DropboxAPI { public DropboxLink media(String path, boolean ssl) throws DropboxException { assertAuthenticated(); String target = "/media/" + session.getAccessType() + path; @SuppressWarnings("unchecked") Map<String, Object> map = (Map<String, Object>)RESTUtility.request(RequestMethod.GET, session.getAPIServer(), target...
DropboxAPI { public DropboxLink media(String path, boolean ssl) throws DropboxException { assertAuthenticated(); String target = "/media/" + session.getAccessType() + path; @SuppressWarnings("unchecked") Map<String, Object> map = (Map<String, Object>)RESTUtility.request(RequestMethod.GET, session.getAPIServer(), target...
DropboxAPI { public DropboxLink media(String path, boolean ssl) throws DropboxException { assertAuthenticated(); String target = "/media/" + session.getAccessType() + path; @SuppressWarnings("unchecked") Map<String, Object> map = (Map<String, Object>)RESTUtility.request(RequestMethod.GET, session.getAPIServer(), target...
@Test public void share() throws Exception{ String path = TESTS_DIR + "/dropbox_song.mp3"; uploadFile(song, path); DropboxLink link = api.share(path); assert link.url != null : "No url for streamed file"; }
public DropboxLink share(String path) throws DropboxException { assertAuthenticated(); String target = "/shares/" + session.getAccessType() + path; @SuppressWarnings("unchecked") Map<String, Object> map = (Map<String, Object>)RESTUtility.request(RequestMethod.GET, session.getAPIServer(), target, VERSION, new String[] {...
DropboxAPI { public DropboxLink share(String path) throws DropboxException { assertAuthenticated(); String target = "/shares/" + session.getAccessType() + path; @SuppressWarnings("unchecked") Map<String, Object> map = (Map<String, Object>)RESTUtility.request(RequestMethod.GET, session.getAPIServer(), target, VERSION, n...
DropboxAPI { public DropboxLink share(String path) throws DropboxException { assertAuthenticated(); String target = "/shares/" + session.getAccessType() + path; @SuppressWarnings("unchecked") Map<String, Object> map = (Map<String, Object>)RESTUtility.request(RequestMethod.GET, session.getAPIServer(), target, VERSION, n...
DropboxAPI { public DropboxLink share(String path) throws DropboxException { assertAuthenticated(); String target = "/shares/" + session.getAccessType() + path; @SuppressWarnings("unchecked") Map<String, Object> map = (Map<String, Object>)RESTUtility.request(RequestMethod.GET, session.getAPIServer(), target, VERSION, n...
DropboxAPI { public DropboxLink share(String path) throws DropboxException { assertAuthenticated(); String target = "/shares/" + session.getAccessType() + path; @SuppressWarnings("unchecked") Map<String, Object> map = (Map<String, Object>)RESTUtility.request(RequestMethod.GET, session.getAPIServer(), target, VERSION, n...
@Test public void search() throws Exception { try { api.search("/", "", 1000, false); assert false: "Short (empty) search string did not throw an error."; } catch (DropboxServerException e) { if (e.error != DropboxServerException._400_BAD_REQUEST) { assert false: "Unexpected Dropbox Error: " + e.toString(); } } String ...
public List<Entry> search(String path, String query, int fileLimit, boolean includeDeleted) throws DropboxException { assertAuthenticated(); if (fileLimit <= 0) { fileLimit = SEARCH_DEFAULT_LIMIT; } String target = "/search/" + session.getAccessType() + path; String[] params = { "query", query, "file_limit", String.val...
DropboxAPI { public List<Entry> search(String path, String query, int fileLimit, boolean includeDeleted) throws DropboxException { assertAuthenticated(); if (fileLimit <= 0) { fileLimit = SEARCH_DEFAULT_LIMIT; } String target = "/search/" + session.getAccessType() + path; String[] params = { "query", query, "file_limit...
DropboxAPI { public List<Entry> search(String path, String query, int fileLimit, boolean includeDeleted) throws DropboxException { assertAuthenticated(); if (fileLimit <= 0) { fileLimit = SEARCH_DEFAULT_LIMIT; } String target = "/search/" + session.getAccessType() + path; String[] params = { "query", query, "file_limit...
DropboxAPI { public List<Entry> search(String path, String query, int fileLimit, boolean includeDeleted) throws DropboxException { assertAuthenticated(); if (fileLimit <= 0) { fileLimit = SEARCH_DEFAULT_LIMIT; } String target = "/search/" + session.getAccessType() + path; String[] params = { "query", query, "file_limit...
DropboxAPI { public List<Entry> search(String path, String query, int fileLimit, boolean includeDeleted) throws DropboxException { assertAuthenticated(); if (fileLimit <= 0) { fileLimit = SEARCH_DEFAULT_LIMIT; } String target = "/search/" + session.getAccessType() + path; String[] params = { "query", query, "file_limit...
@Test public void getMetadataBad() throws Exception { try { String path = TESTS_DIR + "iDoNotExist.txt"; Entry ent = api.metadata(path, 1000, null, true, null); assert ent.isDeleted: "The " + path + " directory should not exist"; } catch (DropboxServerException e) { if (e.error != DropboxServerException._404_NOT_FOUND)...
public Entry metadata(String path, int fileLimit, String hash, boolean list, String rev) throws DropboxException { assertAuthenticated(); if (fileLimit <= 0) { fileLimit = METADATA_DEFAULT_LIMIT; } String[] params = { "file_limit", String.valueOf(fileLimit), "hash", hash, "list", String.valueOf(list), "rev", rev, "loca...
DropboxAPI { public Entry metadata(String path, int fileLimit, String hash, boolean list, String rev) throws DropboxException { assertAuthenticated(); if (fileLimit <= 0) { fileLimit = METADATA_DEFAULT_LIMIT; } String[] params = { "file_limit", String.valueOf(fileLimit), "hash", hash, "list", String.valueOf(list), "rev...
DropboxAPI { public Entry metadata(String path, int fileLimit, String hash, boolean list, String rev) throws DropboxException { assertAuthenticated(); if (fileLimit <= 0) { fileLimit = METADATA_DEFAULT_LIMIT; } String[] params = { "file_limit", String.valueOf(fileLimit), "hash", hash, "list", String.valueOf(list), "rev...
DropboxAPI { public Entry metadata(String path, int fileLimit, String hash, boolean list, String rev) throws DropboxException { assertAuthenticated(); if (fileLimit <= 0) { fileLimit = METADATA_DEFAULT_LIMIT; } String[] params = { "file_limit", String.valueOf(fileLimit), "hash", hash, "list", String.valueOf(list), "rev...
DropboxAPI { public Entry metadata(String path, int fileLimit, String hash, boolean list, String rev) throws DropboxException { assertAuthenticated(); if (fileLimit <= 0) { fileLimit = METADATA_DEFAULT_LIMIT; } String[] params = { "file_limit", String.valueOf(fileLimit), "hash", hash, "list", String.valueOf(list), "rev...
@Test public void createFolder() throws Exception { String path = TESTS_DIR + "createdFolder"; Entry ent = api.createFolder(path); assertEquals(ent.isDir, true); }
public Entry createFolder(String path) throws DropboxException { assertAuthenticated(); String[] params = {"root", session.getAccessType().toString(), "path", path, "locale", session.getLocale().toString()}; @SuppressWarnings("unchecked") Map<String, Object> resp = (Map<String, Object>) RESTUtility.request( RequestMeth...
DropboxAPI { public Entry createFolder(String path) throws DropboxException { assertAuthenticated(); String[] params = {"root", session.getAccessType().toString(), "path", path, "locale", session.getLocale().toString()}; @SuppressWarnings("unchecked") Map<String, Object> resp = (Map<String, Object>) RESTUtility.request...
DropboxAPI { public Entry createFolder(String path) throws DropboxException { assertAuthenticated(); String[] params = {"root", session.getAccessType().toString(), "path", path, "locale", session.getLocale().toString()}; @SuppressWarnings("unchecked") Map<String, Object> resp = (Map<String, Object>) RESTUtility.request...
DropboxAPI { public Entry createFolder(String path) throws DropboxException { assertAuthenticated(); String[] params = {"root", session.getAccessType().toString(), "path", path, "locale", session.getLocale().toString()}; @SuppressWarnings("unchecked") Map<String, Object> resp = (Map<String, Object>) RESTUtility.request...
DropboxAPI { public Entry createFolder(String path) throws DropboxException { assertAuthenticated(); String[] params = {"root", session.getAccessType().toString(), "path", path, "locale", session.getLocale().toString()}; @SuppressWarnings("unchecked") Map<String, Object> resp = (Map<String, Object>) RESTUtility.request...