conflict_resolution
stringlengths
27
16k
<<<<<<< import java.util.HashMap; import java.util.Iterator; ======= >>>>>>> <<<<<<< /** * Remove any reference to the given task. * * @param name - name of the task. */ private void finishTask(String name) { synchronized (getTaskListMutex()) { this.tasks.remove(name); this.futures.remove(name); } ======= private synchronized void finishTask(AgentTask task, boolean updateSkillReferences, boolean updateAgentTraitReferences) { assert task != null; if (updateSkillReferences) { this.tasks.remove(task.getName()); } if (updateAgentTraitReferences) { final Object initiator = task.getInitiator(); if (initiator instanceof AgentTrait) { final AgentTraitData data = SREutils.getSreSpecificData((AgentTrait) initiator, AgentTraitData.class); if (data != null) { data.removeTask(task); } } } >>>>>>> /** * Remove any reference to the given task. * * <p>This function is not thread-safe. * * @param name - name of the task. */ private void finishTask(AgentTask task, boolean updateSkillReferences, boolean updateAgentTraitReferences) { assert task != null; if (updateSkillReferences) { this.tasks.remove(task.getName()); } if (updateAgentTraitReferences) { final Object initiator = task.getInitiator(); if (initiator instanceof AgentTrait) { final AgentTraitData data = SREutils.getSreSpecificData((AgentTrait) initiator, AgentTraitData.class); if (data != null) { data.removeTask(task); } } } <<<<<<< Collection<String> getActiveTasks() { synchronized (getTaskListMutex()) { //TODO: Avoid copy of collection return new ArrayList<>(this.tasks.keySet()); } ======= synchronized Collection<String> getActiveTasks() { return Lists.newArrayList(this.tasks.keySet()); >>>>>>> Collection<String> getActiveTasks() { synchronized (getTaskListMutex()) { //TODO: Avoid copy of collection return Lists.newArrayList(this.tasks.keySet()); } <<<<<<< public AgentTask in(AgentTask task, long delay, Procedure1<? super Agent> procedure) { final AgentTask rtask = task == null ? task("task-" + UUID.randomUUID()) : task; //$NON-NLS-1$ ======= public synchronized AgentTask in(AgentTask task, long delay, Procedure1<? super Agent> procedure) { TaskDescription pair = preRunTask(task, procedure); final AgentTask runnableTask = pair != null ? pair.getTask() : task; final ScheduledFuture<?> sf = this.executorService.schedule( new AgentRunnableTask(runnableTask, false), delay, TimeUnit.MILLISECONDS); pair = postRunTask(pair, task, sf); return pair.getTask(); } private TaskDescription preRunTask(AgentTask task, Procedure1<? super Agent> procedure) { final TaskDescription pair; final AgentTask rtask; if (task == null) { pair = createTaskIfNecessary(null); rtask = pair.getTask(); } else { rtask = task; pair = this.tasks.get(task.getName()); if (pair != null) { pair.setTask(rtask); } } >>>>>>> public AgentTask in(AgentTask task, long delay, Procedure1<? super Agent> procedure) { TaskDescription pair; synchronized (getTaskListMutex()) { pair = preRunTask(task, procedure); } final AgentTask runnableTask = pair != null ? pair.getTask() : task; final ScheduledFuture<?> sf = this.executorService.schedule( new AgentTaskRunner(runnableTask, false), delay, TimeUnit.MILLISECONDS); synchronized (getTaskListMutex()) { pair = postRunTask(pair, task, sf); } return pair.getTask(); } private TaskDescription preRunTask(AgentTask task, Procedure1<? super Agent> procedure) { final TaskDescription pair; final AgentTask rtask; if (task == null) { pair = createTaskIfNecessary(null); rtask = pair.getTask(); } else { rtask = task; pair = this.tasks.get(task.getName()); if (pair != null) { pair.setTask(rtask); } } <<<<<<< public AgentTask every(AgentTask task, long period, Procedure1<? super Agent> procedure) { final AgentTask rtask = task == null ? task("task-" + UUID.randomUUID()) : task; //$NON-NLS-1$ rtask.setProcedure(procedure); final ScheduledFuture<?> sf = this.executorService.scheduleAtFixedRate(new AgentTaskRunner(rtask, true), 0, period, TimeUnit.MILLISECONDS); synchronized (getTaskListMutex()) { this.futures.put(rtask.getName(), sf); } return rtask; ======= public synchronized AgentTask every(AgentTask task, long period, Procedure1<? super Agent> procedure) { TaskDescription description = preRunTask(task, procedure); final AgentTask runnableTask = description != null ? description.getTask() : task; final ScheduledFuture<?> sf = this.executorService.scheduleAtFixedRate( new AgentRunnableTask(runnableTask, true), 0, period, TimeUnit.MILLISECONDS); description = postRunTask(description, task, sf); return description.getTask(); >>>>>>> public AgentTask every(AgentTask task, long period, Procedure1<? super Agent> procedure) { TaskDescription description; synchronized (getTaskListMutex()) { description = preRunTask(task, procedure); } final AgentTask runnableTask = description != null ? description.getTask() : task; final ScheduledFuture<?> sf = this.executorService.scheduleAtFixedRate( new AgentTaskRunner(runnableTask, true), 0, period, TimeUnit.MILLISECONDS); synchronized (getTaskListMutex()) { description = postRunTask(description, task, sf); } return description.getTask();
<<<<<<< "import org.eclipse.xtext.xbase.lib.Inline;", "import org.eclipse.xtext.xbase.lib.Pure;", ======= >>>>>>> "import org.eclipse.xtext.xbase.lib.Pure;", <<<<<<< " @Inline(value = \"5\", constantExpression = true)", " @Pure", ======= >>>>>>> " @Pure", <<<<<<< "import org.eclipse.xtext.xbase.lib.Inline;", "import org.eclipse.xtext.xbase.lib.Pure;", ======= >>>>>>> "import org.eclipse.xtext.xbase.lib.Pure;", <<<<<<< " @Inline(value = \"5\", constantExpression = true)", " @Pure", ======= >>>>>>> " @Pure", <<<<<<< "import org.eclipse.xtext.xbase.lib.Inline;", "import org.eclipse.xtext.xbase.lib.Pure;", ======= >>>>>>> "import org.eclipse.xtext.xbase.lib.Pure;", <<<<<<< " @Inline(value = \"5\", constantExpression = true)", " @Pure", ======= >>>>>>> " @Pure", <<<<<<< " @Inline(value = \"(Y)null\", constantExpression = true)", " @Pure", ======= " @Pure", >>>>>>> " @Pure", <<<<<<< " @Inline(value = \"(Y)null\", constantExpression = true)", " @Pure", ======= " @Pure", >>>>>>> " @Pure",
<<<<<<< public void setSamlIds(Set<IamSamlId> samlIds) { ======= public void setSamlIds(final List<IamSamlId> samlIds) { >>>>>>> public void setSamlIds(Set<IamSamlId> samlIds) { <<<<<<< public void setOidcIds(Set<IamOidcId> oidcIds) { ======= public void setOidcIds(final List<IamOidcId> oidcIds) { >>>>>>> public void setOidcIds(Set<IamOidcId> oidcIds) { <<<<<<< ======= public void addOidcId(IamOidcId oidcId) { getOidcIds().add(oidcId); oidcId.setAccount(this); } >>>>>>> <<<<<<< public void setSshKeys(Set<IamSshKey> sshKeys) { ======= public void setSshKeys(final List<IamSshKey> sshKeys) { >>>>>>> public void setSshKeys(Set<IamSshKey> sshKeys) { <<<<<<< public void setX509Certificates(Set<IamX509Certificate> x509Certificates) { ======= public void setX509Certificates(final List<IamX509Certificate> x509Certificates) { >>>>>>> public void setX509Certificates(Set<IamX509Certificate> x509Certificates) { <<<<<<< public boolean hasOidcIds() { return !oidcIds.isEmpty(); } public boolean hasSshKeys() { return !sshKeys.isEmpty(); } public boolean hasSamlIds() { return !samlIds.isEmpty(); } ======= public String getConfirmationKey() { return confirmationKey; } public void setConfirmationKey(final String confirmationKey) { this.confirmationKey = confirmationKey; } public String getResetKey() { return resetKey; } public void setResetKey(final String resetKey) { this.resetKey = resetKey; } public IamRegistrationRequest getRegistrationRequest() { return registrationRequest; } public void setRegistrationRequest(final IamRegistrationRequest registrationRequest) { this.registrationRequest = registrationRequest; } >>>>>>> public boolean hasOidcIds() { return !oidcIds.isEmpty(); } public boolean hasSshKeys() { return !sshKeys.isEmpty(); } public boolean hasSamlIds() { return !samlIds.isEmpty(); } public String getConfirmationKey() { return confirmationKey; } public void setConfirmationKey(final String confirmationKey) { this.confirmationKey = confirmationKey; } public String getResetKey() { return resetKey; } public void setResetKey(final String resetKey) { this.resetKey = resetKey; } public IamRegistrationRequest getRegistrationRequest() { return registrationRequest; } public void setRegistrationRequest(final IamRegistrationRequest registrationRequest) { this.registrationRequest = registrationRequest; }
<<<<<<< ======= import org.springframework.data.domain.Page; >>>>>>> import org.springframework.data.domain.Page;
<<<<<<< Assert.assertEquals(expected, count); ======= >>>>>>> <<<<<<< ======= >>>>>>>
<<<<<<< FilterProvider excludePasswordFilter = new SimpleFilterProvider() .addFilter("passwordFilter", SimpleBeanPropertyFilter.serializeAllExcept("password")); private Set<String> parseAttributes(String attributesParameter) { ======= private Set<String> parseAttributes(final String attributesParameter) { >>>>>>> FilterProvider excludePasswordFilter = new SimpleFilterProvider().addFilter("passwordFilter", SimpleBeanPropertyFilter.serializeAllExcept("password")); private Set<String> parseAttributes(final String attributesParameter) { <<<<<<< private void handleValidationError(String message, BindingResult validationResult) { if (validationResult.hasErrors()) { throw new ScimValidationException( ValidationErrorMessageHelper.buildValidationErrorMessage(message, validationResult)); } } ======= >>>>>>> <<<<<<< @RequestMapping(method = RequestMethod.GET, produces = ScimConstants.SCIM_CONTENT_TYPE) public MappingJacksonValue listUsers(@RequestParam(required = false) Integer count, @RequestParam(required = false) Integer startIndex, @RequestParam(required = false) String attributes) { ======= @RequestMapping(method = RequestMethod.GET, produces = ScimConstants.SCIM_CONTENT_TYPE) public MappingJacksonValue listUsers(@RequestParam(required = false) final Integer count, @RequestParam(required = false) final Integer startIndex, @RequestParam(required = false) final String attributes) { >>>>>>> @RequestMapping(method = RequestMethod.GET, produces = ScimConstants.SCIM_CONTENT_TYPE) public MappingJacksonValue listUsers(@RequestParam(required = false) final Integer count, @RequestParam(required = false) final Integer startIndex, @RequestParam(required = false) final String attributes) { <<<<<<< public MappingJacksonValue create(@RequestBody @Validated(ScimUser.NewUserValidation.class) ScimUser user, BindingResult validationResult) { ======= public ScimUser create( @RequestBody @Validated(ScimUser.NewUserValidation.class) final ScimUser user, final BindingResult validationResult) { >>>>>>> public MappingJacksonValue create( @RequestBody @Validated(ScimUser.NewUserValidation.class) final ScimUser user, final BindingResult validationResult) { <<<<<<< @RequestBody @Validated(ScimUser.NewUserValidation.class) ScimUser user, BindingResult validationResult) { ======= @RequestBody @Validated(ScimUser.NewUserValidation.class) final ScimUser user, final BindingResult validationResult) { >>>>>>> @RequestBody @Validated(ScimUser.NewUserValidation.class) final ScimUser user, final BindingResult validationResult) {
<<<<<<< "it.infn.mw.iam.core.web", "it.infn.mw.iam.api", "it.infn.mw.iam.registration", "it.infn.mw.iam.dashboard", ======= "it.infn.mw.iam.core", "it.infn.mw.iam.api", "it.infn.mw.iam.registration", "it.infn.mw.iam.notification", >>>>>>> "it.infn.mw.iam.core", "it.infn.mw.iam.api", "it.infn.mw.iam.registration", "it.infn.mw.iam.dashboard", "it.infn.mw.iam.notification",
<<<<<<< ======= >>>>>>>
<<<<<<< import it.infn.mw.iam.persistence.repository.IamEmailNotificationRepository; ======= import it.infn.mw.iam.notification.NotificationService; >>>>>>> import it.infn.mw.iam.notification.NotificationService; <<<<<<< @Autowired private IamEmailNotificationRepository notificationRepository; ======= @Autowired private NotificationService notificationService; >>>>>>> @Autowired private NotificationService notificationService; <<<<<<< Boolean retval = RestAssured.given() .port(iamPort) .pathParam("token", resetKey) ======= RestAssured.given() .port(8080) .formParam("email", "[email protected]") >>>>>>> RestAssured.given() .port(iamPort) .formParam("email", "[email protected]") <<<<<<< .port(iamPort) .param("resetkey", resetKey) ======= .log().all() .port(8080) .param("token", resetToken) >>>>>>> .port(iamPort) .log().all() .param("token", resetToken) <<<<<<< .port(iamPort) .pathParam("email", emailAddress) ======= .log().all() .port(8080) .pathParam("token", resetToken) >>>>>>> .port(iamPort) .log().all() .pathParam("token", resetToken)
<<<<<<< import java.util.Arrays; ======= >>>>>>> import java.util.Arrays; <<<<<<< import org.springframework.security.core.userdetails.User; ======= >>>>>>> import org.springframework.security.core.userdetails.User; <<<<<<< this.inactiveAccountHandler = handler; } protected User buildUserFromIamAccount(IamAccount account) { inactiveAccountHandler.handleInactiveAccount(account); return AuthenticationUtils.userFromIamAccount(account); } protected User buildUserFromSamlCredential(IamSamlId samlId, SAMLCredential credential) { return new User(samlId.getUserId(), "", Arrays.asList(ExternalAuthenticationHandlerSupport.EXT_AUTHN_UNREGISTERED_USER_AUTH)); ======= >>>>>>>
<<<<<<< List<BlockPos> positions = event.explosion.func_180343_e(); for (Iterator<BlockPos> it = positions.iterator(); it.hasNext();) ======= else if (exploder instanceof EntityLiving) ident = APIRegistry.IDENT_NPC; List<ChunkPosition> positions = event.explosion.affectedBlockPositions; for (Iterator<ChunkPosition> it = positions.iterator(); it.hasNext();) >>>>>>> else if (exploder instanceof EntityLiving) ident = APIRegistry.IDENT_NPC; List<BlockPos> positions = event.explosion.func_180343_e(); for (Iterator<BlockPos> it = positions.iterator(); it.hasNext();) <<<<<<< if (mop == null) point = new WorldPoint(event.entityPlayer.dimension, event.pos); ======= if (mop == null && event.x == 0 && event.y == 0 && event.z == 0) point = new WorldPoint(event.entityPlayer); else if (mop == null) point = new WorldPoint(event.world, event.x, event.y, event.z); >>>>>>> if (mop == null && event.pos.getX() == 0 && event.pos.getY() == 0 && event.pos.getZ() == 0) point = new WorldPoint(event.entityPlayer); else if (mop == null) point = new WorldPoint(event.entityPlayer.dimension, event.pos);
<<<<<<< Optional<String> getPrivacyPolicyUrl(); String getPrivacyPolicyText(); String getLoginButtonText(); ======= >>>>>>> Optional<String> getPrivacyPolicyUrl(); String getPrivacyPolicyText(); String getLoginButtonText();
<<<<<<< import com.fasterxml.jackson.annotation.JsonProperty; ======= >>>>>>>
<<<<<<< accountRepository.findByUsername(user.getUserName()).ifPresent(a -> { throw new ScimResourceExistsException("userName is already taken: " + a.getUsername()); }); ======= String uuid = UUID.randomUUID().toString(); >>>>>>> accountRepository.findByUsername(user.getUserName()).ifPresent(a -> { throw new ScimResourceExistsException("userName is already taken: " + a.getUsername()); }); String uuid = UUID.randomUUID().toString(); <<<<<<< ======= IamUserInfo userInfo = new IamUserInfo(); if (user.getName() != null) { userInfo.setGivenName(user.getName().getGivenName()); userInfo.setFamilyName(user.getName().getFamilyName()); userInfo.setMiddleName(user.getName().getMiddleName()); } if (user.getAddresses() != null && !user.getAddresses().isEmpty()) { userInfo.setAddress(addressConverter.fromScim(user.getAddresses().get(0))); } if (!user.getEmails().isEmpty()) { userInfo.setEmail(user.getEmails().get(0).getValue()); } account.setUserInfo(userInfo); >>>>>>> IamUserInfo userInfo = new IamUserInfo(); if (user.getName() != null) { userInfo.setGivenName(user.getName().getGivenName()); userInfo.setFamilyName(user.getName().getFamilyName()); userInfo.setMiddleName(user.getName().getMiddleName()); } if (user.getAddresses() != null && !user.getAddresses().isEmpty()) { userInfo.setAddress(addressConverter.fromScim(user.getAddresses().get(0))); } if (!user.getEmails().isEmpty()) { userInfo.setEmail(user.getEmails().get(0).getValue()); } account.setUserInfo(userInfo);
<<<<<<< import it.infn.mw.iam.api.scim.model.ScimAddress; ======= import it.infn.mw.iam.api.scim.exception.ScimResourceExistsException; >>>>>>> import it.infn.mw.iam.api.scim.exception.ScimResourceExistsException; import it.infn.mw.iam.api.scim.model.ScimAddress; <<<<<<< public UserConverter(ScimResourceLocationProvider rlp, AddressConverter ac, X509CertificateConverter cc) { resourceLocationProvider = rlp; addressConverter = ac; certificateConverter = cc; ======= public UserConverter(ScimResourceLocationProvider rlp, AddressConverter ac, OidcIdConverter oidc) { this.resourceLocationProvider = rlp; this.addressConverter = ac; this.oidcIdConverter = oidc; >>>>>>> public UserConverter(ScimResourceLocationProvider rlp, AddressConverter ac, X509CertificateConverter cc, OidcIdConverter oidc) { this.resourceLocationProvider = rlp; this.addressConverter = ac; this.certificateConverter = cc; this.oidcIdConverter = oidc; <<<<<<< userInfo.setEmail(scimUser.getEmails().get(0).getValue()); userInfo.setGivenName(scimUser.getName().getGivenName()); userInfo.setFamilyName(scimUser.getName().getFamilyName()); userInfo.setMiddleName(scimUser.getName().getMiddleName()); userInfo.setName(scimUser.getName().getFormatted()); ======= if (scimUser.getPassword() != null) { account.setPassword(scimUser.getPassword()); } userInfo.setEmail(scimUser.getEmails().get(0).getValue()); userInfo.setGivenName(scimUser.getName().getGivenName()); userInfo.setFamilyName(scimUser.getName().getFamilyName()); userInfo.setMiddleName(scimUser.getName().getMiddleName()); userInfo.setName(scimUser.getName().getFormatted()); >>>>>>> if (scimUser.getPassword() != null) { account.setPassword(scimUser.getPassword()); } userInfo.setEmail(scimUser.getEmails().get(0).getValue()); userInfo.setGivenName(scimUser.getName().getGivenName()); userInfo.setFamilyName(scimUser.getName().getFamilyName()); userInfo.setMiddleName(scimUser.getName().getMiddleName()); userInfo.setName(scimUser.getName().getFormatted()); <<<<<<< ======= ScimEmail email = ScimEmail.builder().email(entity.getUserInfo().getEmail()).build(); >>>>>>> <<<<<<< if (entity.getUserInfo() != null && entity.getUserInfo().getAddress() != null) { return addressConverter.toScim(entity.getUserInfo().getAddress()); } return null; ======= ScimUser retval = builder.build(); return retval; >>>>>>> if (entity.getUserInfo() != null && entity.getUserInfo().getAddress() != null) { return addressConverter.toScim(entity.getUserInfo().getAddress()); } return null;
<<<<<<< admin = new HBaseAdmin(this.conf); InputStream mappingInputStream ; // If there is a mapping definition in the configuration, use it. if (getConf().get(XML_MAPPING_DEFINITION, null) != null) { mappingInputStream = IOUtils.toInputStream(getConf().get(XML_MAPPING_DEFINITION, null)) ; } // Otherwise use the configuration from de default file gora-hbase-mapping.xml or whatever // configured in the key "gora.hbase.mapping.file" else { mappingInputStream = getClass().getClassLoader().getResourceAsStream(getConf().get(PARSE_MAPPING_FILE_KEY, DEFAULT_MAPPING_FILE)) ; } mapping = readMapping(mappingInputStream); ======= admin = ConnectionFactory.createConnection(getConf()).getAdmin(); mapping = readMapping(getConf().get(PARSE_MAPPING_FILE_KEY, DEFAULT_MAPPING_FILE)); >>>>>>> admin = ConnectionFactory.createConnection(getConf()).getAdmin(); InputStream mappingInputStream ; // If there is a mapping definition in the configuration, use it. if (getConf().get(XML_MAPPING_DEFINITION, null) != null) { mappingInputStream = IOUtils.toInputStream(getConf().get(XML_MAPPING_DEFINITION, null)) ; } // Otherwise use the configuration from de default file gora-hbase-mapping.xml or whatever // configured in the key "gora.hbase.mapping.file" else { mappingInputStream = getClass().getClassLoader().getResourceAsStream(getConf().get(PARSE_MAPPING_FILE_KEY, DEFAULT_MAPPING_FILE)) ; } mapping = readMapping(mappingInputStream);
<<<<<<< import in.androidtweak.inputmethod.annotations.UsedForTesting; ======= import in.androidtweak.inputmethod.indic.R; import org.wikimedia.morelangs.InputMethod; >>>>>>> import in.androidtweak.inputmethod.annotations.UsedForTesting; import org.wikimedia.morelangs.InputMethod; <<<<<<< ======= checkForTransliteration(); } >>>>>>> <<<<<<< ======= mService.onRefreshKeyboard(); checkForTransliteration(); } private void checkForTransliteration() { if(getCurrentSubtype().containsExtraValueKey(Constants.Subtype.ExtraValue.TRANSLITERATION_METHOD)) { InputMethod im; try { String transliterationName = getCurrentSubtype().getExtraValueOf(Constants.Subtype.ExtraValue.TRANSLITERATION_METHOD); mService.enableTransliteration(transliterationName); } catch (Exception e) { e.printStackTrace(); throw new RuntimeException(e); } } else { mService.disableTransliteration(); } >>>>>>> checkForTransliteration(); } private void checkForTransliteration() { if(getCurrentSubtype().containsExtraValueKey(Constants.Subtype.ExtraValue.TRANSLITERATION_METHOD)) { InputMethod im; try { String transliterationName = getCurrentSubtype().getExtraValueOf(Constants.Subtype.ExtraValue.TRANSLITERATION_METHOD); mService.enableTransliteration(transliterationName); } catch (Exception e) { e.printStackTrace(); throw new RuntimeException(e); } } else { mService.disableTransliteration(); }
<<<<<<< import java.util.TreeSet; ======= import java.io.IOException; import javax.xml.parsers.ParserConfigurationException; import org.wikimedia.morelangs.InputMethod; import org.xml.sax.SAXException; >>>>>>> import java.util.TreeSet; import java.io.IOException; import javax.xml.parsers.ParserConfigurationException; import org.wikimedia.morelangs.InputMethod; import org.xml.sax.SAXException; <<<<<<< private final TreeSet<Long> mCurrentlyPressedHardwareKeys = CollectionUtils.newTreeSet(); // Personalization debugging params private boolean mUseOnlyPersonalizationDictionaryForDebug = false; private boolean mBoostPersonalizationDictionaryForDebug = false; ======= private boolean mTransliterationOn; private AudioAndHapticFeedbackManager mFeedbackManager; >>>>>>> private final TreeSet<Long> mCurrentlyPressedHardwareKeys = CollectionUtils.newTreeSet(); // Personalization debugging params private boolean mUseOnlyPersonalizationDictionaryForDebug = false; private boolean mBoostPersonalizationDictionaryForDebug = false; private boolean mTransliterationOn; <<<<<<< final SettingsValues currentSettingsValues = mSettings.getCurrent(); if (!currentSettingsValues.mAutoCap) return Constants.TextUtils.CAP_MODE_OFF; ======= if (!mSettingsValues.mAutoCap || mTransliterationOn) { return Constants.TextUtils.CAP_MODE_OFF; } >>>>>>> final SettingsValues currentSettingsValues = mSettings.getCurrent(); if (!currentSettingsValues.mAutoCap || mTransliterationOn) { return Constants.TextUtils.CAP_MODE_OFF; }
<<<<<<< import com.forgeessentials.api.EnumMobType; import com.forgeessentials.commands.util.CommandButcherTickTask; import com.forgeessentials.commands.util.FEcmdModuleCommands; import com.forgeessentials.util.OutputHandler; import com.forgeessentials.commons.selections.WorldPoint; import com.forgeessentials.util.tasks.TaskRegistry; ======= import java.util.Arrays; import java.util.LinkedList; import java.util.List; import java.util.Queue; import net.minecraft.command.CommandException; >>>>>>> import com.forgeessentials.api.EnumMobType; import com.forgeessentials.commands.util.CommandButcherTickTask; import com.forgeessentials.commands.util.FEcmdModuleCommands; import com.forgeessentials.util.OutputHandler; import com.forgeessentials.commons.selections.WorldPoint; import com.forgeessentials.util.tasks.TaskRegistry; import java.util.Arrays; import java.util.LinkedList; import java.util.List; import java.util.Queue; import net.minecraft.command.CommandException;
<<<<<<< public void processCommand(ICommandSender sender, String[] args) throws CommandException ======= public String getCommandUsage(ICommandSender sender) { return "/doas <player> <command> Run a command as another player."; } @Override public boolean canConsoleUseCommand() { return true; } @Override public PermissionLevel getPermissionLevel() { return PermissionLevel.OP; } @Override public String getPermissionNode() { return ModuleCommands.PERM + ".doas"; } @Override public void registerExtraPermissions() { PermissionManager.registerPermission("fe.commands.doas.console", PermissionLevel.OP); } @Override public void processCommand(ICommandSender sender, String[] args) >>>>>>> public String getCommandUsage(ICommandSender sender) { return "/doas <player> <command> Run a command as another player."; } @Override public boolean canConsoleUseCommand() { return true; } @Override public PermissionLevel getPermissionLevel() { return PermissionLevel.OP; } @Override public String getPermissionNode() { return ModuleCommands.PERM + ".doas"; } @Override public void registerExtraPermissions() { PermissionManager.registerPermission("fe.commands.doas.console", PermissionLevel.OP); } @Override public void processCommand(ICommandSender sender, String[] args) throws CommandException <<<<<<< public boolean canConsoleUseCommand() { return true; } @Override public List<String> addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) ======= public List<String> addTabCompletionOptions(ICommandSender sender, String[] args) >>>>>>> public List<String> addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos)
<<<<<<< public void processCommandPlayer(MinecraftServer server, EntityPlayerMP player, String[] args) throws CommandException ======= public String getPermissionNode() { return ModuleCommands.PERM + ".noclip"; } @Override public void processCommandPlayer(EntityPlayerMP player, String[] args) throws CommandException >>>>>>> public String getPermissionNode() { return ModuleCommands.PERM + ".noclip"; } @Override public void processCommandPlayer(MinecraftServer server, EntityPlayerMP player, String[] args) throws CommandException
<<<<<<< package com.orangelabs.rcs.service.api; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; import javax2.sip.message.Response; import com.gsma.services.rcs.DeliveryInfo; import com.gsma.services.rcs.DeliveryInfo.ReasonCode; ======= package com.orangelabs.rcs.service.api; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; import com.gsma.services.rcs.GroupDeliveryInfoLog; import com.gsma.services.rcs.GroupDeliveryInfoLog.ReasonCode; >>>>>>> package com.orangelabs.rcs.service.api; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; import javax2.sip.message.Response; import com.gsma.services.rcs.GroupDeliveryInfoLog; import com.gsma.services.rcs.GroupDeliveryInfoLog.ReasonCode;
<<<<<<< import com.gsma.services.rcs.chat.ChatService; import com.gsma.services.rcs.chat.ChatServiceConfiguration; ======= import com.gsma.services.rcs.chat.ChatMessage; >>>>>>> import com.gsma.services.rcs.chat.ChatMessage; import com.gsma.services.rcs.chat.ChatService; import com.gsma.services.rcs.chat.ChatServiceConfiguration; <<<<<<< String msgId = sendTextMessage(text); if (msgId != null) { // Warn the composing manager that the message was sent composingManager.messageWasSent(); ======= ChatMessage message = sendTextMessage(text); if (message != null) { // Add text to the message history TextMessageItem item = new TextMessageItem(RcsCommon.Direction.OUTGOING, getString(R.string.label_me), text, message.getId()); addMessageHistory(item); >>>>>>> ChatMessage message = sendTextMessage(text); if (message != null) { // Warn the composing manager that the message was sent composingManager.messageWasSent(); <<<<<<< } /** * Send a geolocation * * @param geoloc ======= } /** * Send a geoloc and display it * * @param geoloc Geoloc */ private void sendGeoloc(Geoloc geoloc) { // Check if the service is available boolean registered = false; try { registered = connectionManager.getChatApi().isServiceRegistered(); } catch(Exception e) { e.printStackTrace(); } if (!registered) { Utils.showMessage(ChatView.this, getString(R.string.label_service_not_available)); return; } // Send text message GeolocMessage message = sendGeolocMessage(geoloc); if (message != null) { // Add geoloc to the message history // Add text to the message history String text = geoloc.getLabel() + "," + geoloc.getLatitude() + "," + geoloc.getLongitude(); TextMessageItem item = new TextMessageItem(RcsCommon.Direction.OUTGOING, getString(R.string.label_me), text, message.getId()); addMessageHistory(item); } else { Utils.showMessage(ChatView.this, getString(R.string.label_send_im_failed)); } } /** * Add quick text >>>>>>> } /** * Send a geolocation * * @param geoloc <<<<<<< ======= @Override public boolean onKeyDown(int keyCode, KeyEvent event) { switch (keyCode) { case KeyEvent.KEYCODE_BACK: // Quit the session quitSession(); return true; } return super.onKeyDown(keyCode, event); } /** * Send text message * * @param msg Message * @return Chat message */ protected abstract ChatMessage sendTextMessage(String msg); /** * Send geoloc message * * @param geoloc Geoloc * @return geoloc message */ protected abstract GeolocMessage sendGeolocMessage(Geoloc geoloc); /** * Quit the session */ protected abstract void quitSession(); /** * Update the is composing status * * @param isTyping Is composing status */ protected abstract void setTypingStatus(boolean isTyping); /** * Get a geoloc */ protected void getGeoLoc() { // Start a new activity to send a geolocation startActivityForResult(new Intent(this, EditGeoloc.class), SELECT_GEOLOCATION); } /** * On activity result * * @param requestCode Request code * @param resultCode Result code * @param data Data */ public void onActivityResult(int requestCode, int resultCode, Intent data) { if (resultCode != RESULT_OK) { return; } switch(requestCode) { case SELECT_GEOLOCATION: { // Get selected geoloc Geoloc geoloc = data.getParcelableExtra(EditGeoloc.EXTRA_GEOLOC); // Send geoloc sendGeoloc(geoloc); } break; } } /** * Show us in a map * * @param participant A participant */ protected void showUsInMap(ContactId participant) { Intent intent = new Intent(this, ShowUsInMap.class); ArrayList<String> list = new ArrayList<String>(); list.add(participant.toString()); intent.putStringArrayListExtra(ShowUsInMap.EXTRA_CONTACTS, list); startActivity(intent); } /** * Show us in a map * * @param participants List of participants */ protected void showUsInMap(Set<String> participants) { Intent intent = new Intent(this, ShowUsInMap.class); ArrayList<String> list = new ArrayList<String>(participants); intent.putStringArrayListExtra(ShowUsInMap.EXTRA_CONTACTS, list); startActivity(intent); } >>>>>>> <<<<<<< protected void displayComposingEvent(final ContactId contact, final boolean status) { final String from = RcsDisplayName.getInstance(this).getDisplayName(contact); // Execute on UI handler since callback is executed from service handler.post(new Runnable() { public void run() { TextView view = (TextView) findViewById(R.id.isComposingText); if (status) { // Display is-composing notification view.setText(getString(R.string.label_contact_is_composing, from)); view.setVisibility(View.VISIBLE); } else { // Hide is-composing notification view.setVisibility(View.GONE); ======= protected Set<String> loadHistory(String key) { if (LogUtils.isActive) { Log.d(LOGTAG, "loadHistory key" + key); } msgListAdapter.clear(); Set<String> unReadMessageIDs = new HashSet<String>(); Map<ContactId,String> participants = new HashMap<ContactId,String>(); Uri uri = Uri.withAppendedPath(ChatLog.Message.CONTENT_CHAT_URI, key); Cursor cursor = null; ContactUtils contactUtils = ContactUtils.getInstance(this); try { // @formatter:off String[] projection = new String[] { ChatLog.Message.DIRECTION, ChatLog.Message.CONTACT, ChatLog.Message.CONTENT, ChatLog.Message.MIME_TYPE, ChatLog.Message.MESSAGE_ID, ChatLog.Message.READ_STATUS }; // @formatter:on cursor = getContentResolver().query(uri, projection, LOAD_HISTORY_WHERE_CLAUSE, null, ChatLog.Message.TIMESTAMP + " ASC"); while (cursor.moveToNext()) { int direction = cursor.getInt(0); String _contact = cursor.getString(1); String content = cursor.getString(2); String contentType = cursor.getString(3); String msgId = cursor.getString(4); ContactId contact = null; if (_contact != null) { try { contact = contactUtils.formatContact(_contact); // Do not fill map if record already exists if (!participants.containsKey(contact)) { participants.put(contact, RcsDisplayName.get(this, contact)); } String displayName = participants.get(contact); displayName = RcsDisplayName.convert(ChatView.this, direction, contact, displayName); if (ChatLog.Message.MimeType.GEOLOC_MESSAGE.equals(contentType)) { Geoloc geoloc = ChatLog.getGeoloc(content); if (geoloc != null) { addGeolocHistory(direction, contact, geoloc, msgId, displayName); } else { if (LogUtils.isActive) { Log.w(LOGTAG, "Invalid geoloc " + content); } } } else { addMessageHistory(direction, contact, content, msgId, displayName); } boolean unread = cursor.getString(5).equals(Integer.toString(RcsCommon.ReadStatus.UNREAD)); if (unread) { unReadMessageIDs.add(msgId); } } catch (RcsContactFormatException e) { if (LogUtils.isActive) { Log.e(LOGTAG, "Bad contact in history " + _contact, e); } } >>>>>>> protected void displayComposingEvent(final ContactId contact, final boolean status) { final String from = RcsDisplayName.getInstance(this).getDisplayName(contact); // Execute on UI handler since callback is executed from service handler.post(new Runnable() { public void run() { TextView view = (TextView) findViewById(R.id.isComposingText); if (status) { // Display is-composing notification view.setText(getString(R.string.label_contact_is_composing, from)); view.setVisibility(View.VISIBLE); } else { // Hide is-composing notification view.setVisibility(View.GONE);
<<<<<<< settings.get("basic").put("rules", config.get("basic", "rules", settings.get("basic").get("rules").toString()).value); /** * WorldControl */ ======= settings.get("rules").put("rule1", config.get("rules", "rule1", settings.get("rules").get("rule1").toString()).value); settings.get("rules").put("rule2", config.get("rules", "rule2", settings.get("rules").get("rule2").toString()).value); settings.get("rules").put("rule3", config.get("rules", "rule3", settings.get("rules").get("rule3").toString()).value); settings.get("rules").put("rule4", config.get("rules", "rule4", settings.get("rules").get("rule4").toString()).value); settings.get("rules").put("rule5", config.get("rules", "rule5", settings.get("rules").get("rule5").toString()).value); >>>>>>> settings.get("rules").put("rule1", config.get("rules", "rule1", settings.get("rules").get("rule1").toString()).value); settings.get("rules").put("rule2", config.get("rules", "rule2", settings.get("rules").get("rule2").toString()).value); settings.get("rules").put("rule3", config.get("rules", "rule3", settings.get("rules").get("rule3").toString()).value); settings.get("rules").put("rule4", config.get("rules", "rule4", settings.get("rules").get("rule4").toString()).value); settings.get("rules").put("rule5", config.get("rules", "rule5", settings.get("rules").get("rule5").toString()).value); /** * WorldControl */
<<<<<<< import net.minecraftforge.fml.common.FMLCommonHandler; import net.minecraftforge.fml.common.eventhandler.EventPriority; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent; ======= import net.minecraftforge.event.entity.player.PlayerEvent; >>>>>>> import net.minecraftforge.event.entity.player.PlayerEvent; import net.minecraftforge.fml.common.FMLCommonHandler; import net.minecraftforge.fml.common.eventhandler.EventPriority; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent;
<<<<<<< import com.forgeessentials.util.ServerUtil; import com.forgeessentials.util.events.PlayerChangedZone; ======= >>>>>>> import com.forgeessentials.util.ServerUtil; <<<<<<< ======= import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.eventhandler.Event.Result; import cpw.mods.fml.common.eventhandler.EventPriority; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.registry.GameData; import cpw.mods.fml.relauncher.Side; >>>>>>> <<<<<<< WorldData world = em.find(WorldData.class, e.world.provider.getDimensionId()); ======= WorldData world = em.find(WorldData.class, event.world.provider.dimensionId); >>>>>>> WorldData world = em.find(WorldData.class, event.world.provider.getDimensionId()); <<<<<<< world.id = e.world.provider.getDimensionId(); world.name = e.world.provider.getDimensionName(); ======= world.id = event.world.provider.dimensionId; world.name = event.world.provider.getDimensionName(); >>>>>>> world.id = event.world.provider.getDimensionId(); world.name = event.world.provider.getDimensionName();
<<<<<<< import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; ======= >>>>>>> import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; <<<<<<< public void setMapName(String mapname) { this.mapName = mapname == null ? "" : mapname; ======= public void setMapName(String mapName) { this.mapName = mapName; >>>>>>> public void setMapName(String mapname) { this.mapName = mapname == null ? "" : mapname; <<<<<<< if (location != null) { for (Player player : getPlayers()) { player.teleport(location); } ======= if (location != null) { for (Player player : getPlayers()) { player.teleport(location); } for (Player player : getSpectators()) { player.teleport(location); } >>>>>>> if (location != null) { for (Player player : getPlayers()) { player.teleport(location); } for (Player player : getSpectators()) { player.teleport(location); }
<<<<<<< if (USE_MOCK_PINGS.get(settings) && USE_ZEN2.get(settings) == false) { return new MockZenPing(settings, this); ======= if (USE_MOCK_PINGS.get(settings)) { return new MockZenPing(this); >>>>>>> if (USE_MOCK_PINGS.get(settings) && USE_ZEN2.get(settings) == false) { return new MockZenPing(this);
<<<<<<< public void processCommandPlayer(MinecraftServer server, EntityPlayerMP sender, String[] args) throws CommandException ======= public boolean canConsoleUseCommand() { return true; } @Override public PermissionLevel getPermissionLevel() { return PermissionLevel.OP; } @Override public String getCommandUsage(ICommandSender sender) { return "/kill <player> Commit suicide or kill other players (with special permission)."; } @Override public String getPermissionNode() { return ModuleCommands.PERM + ".kill"; } @Override public void registerExtraPermissions() { APIRegistry.perms.registerPermission(getPermissionNode() + ".others", PermissionLevel.OP); } @Override public void processCommandPlayer(EntityPlayerMP sender, String[] args) throws CommandException >>>>>>> public boolean canConsoleUseCommand() { return true; } @Override public PermissionLevel getPermissionLevel() { return PermissionLevel.OP; } @Override public String getCommandUsage(ICommandSender sender) { return "/kill <player> Commit suicide or kill other players (with special permission)."; } @Override public String getPermissionNode() { return ModuleCommands.PERM + ".kill"; } @Override public void registerExtraPermissions() { APIRegistry.perms.registerPermission(getPermissionNode() + ".others", PermissionLevel.OP); } @Override public void processCommandPlayer(MinecraftServer server, EntityPlayerMP sender, String[] args) throws CommandException <<<<<<< public boolean canConsoleUseCommand() { return true; } @Override public void registerExtraPermissions() { APIRegistry.perms.registerPermission(getPermissionNode() + ".others", PermissionLevel.OP); } @Override public List<String> getTabCompletionOptions(MinecraftServer server, ICommandSender sender, String[] args, BlockPos pos) ======= public List<String> addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) >>>>>>> public List<String> getTabCompletionOptions(MinecraftServer server, ICommandSender sender, String[] args, BlockPos pos)
<<<<<<< import org.elasticsearch.script.ScriptService; import org.elasticsearch.script.Template; import org.elasticsearch.xpack.watcher.support.WatcherScript; ======= import org.elasticsearch.script.Script; import org.elasticsearch.xpack.common.ScriptServiceProxy; >>>>>>> import org.elasticsearch.script.Script; import org.elasticsearch.script.ScriptService; import org.elasticsearch.xpack.watcher.support.WatcherScript;
<<<<<<< ======= /** * Creates a new request that inherits headers and context from the request provided as argument. */ public ReplicationRequest(ActionRequest<?> request) { super(request); } >>>>>>> <<<<<<< public ReplicationRequest(ShardId shardId) { ======= public ReplicationRequest(ActionRequest<?> request, ShardId shardId) { super(request); >>>>>>> public ReplicationRequest(ShardId shardId) { <<<<<<< ======= */ protected ReplicationRequest(Request request) { this(request, request); } /** * Copy constructor that creates a new request that is a copy of the one provided as an argument. >>>>>>> <<<<<<< protected ReplicationRequest(T request) { ======= protected ReplicationRequest(Request request, ActionRequest<?> originalRequest) { super(originalRequest); >>>>>>> protected ReplicationRequest(Request request) {
<<<<<<< import org.elasticsearch.index.mapper.internal.SourceFieldMapper; import org.elasticsearch.index.mapper.internal.UidFieldMapper; import org.elasticsearch.index.mapper.object.RootObjectMapper; import org.elasticsearch.index.seqno.SequenceNumbersService; ======= import org.elasticsearch.index.mapper.RootObjectMapper; import org.elasticsearch.index.mapper.SourceFieldMapper; import org.elasticsearch.index.mapper.UidFieldMapper; >>>>>>> import org.elasticsearch.index.mapper.RootObjectMapper; import org.elasticsearch.index.mapper.SourceFieldMapper; import org.elasticsearch.index.mapper.UidFieldMapper; import org.elasticsearch.index.seqno.SequenceNumbersService; <<<<<<< final Engine.Index operation = new Engine.Index(newUid("test#1"), doc, SequenceNumbersService.UNASSIGNED_SEQ_NO, i, VersionType.EXTERNAL, Engine.Operation.Origin.PRIMARY, System.nanoTime()); ======= final Engine.Index operation = new Engine.Index(newUid("test#1"), doc, i, VersionType.EXTERNAL, Engine.Operation.Origin.PRIMARY, System.nanoTime(), -1, false); >>>>>>> final Engine.Index operation = new Engine.Index(newUid("test#1"), doc, SequenceNumbersService.UNASSIGNED_SEQ_NO, i, VersionType.EXTERNAL, Engine.Operation.Origin.PRIMARY, System.nanoTime(), -1, false); <<<<<<< engine.index(new Engine.Index(newUid("3"), doc, SequenceNumbersService.UNASSIGNED_SEQ_NO, Versions.MATCH_ANY, VersionType.INTERNAL, Engine.Operation.Origin.PRIMARY, System.nanoTime() - engine.engineConfig.getFlushMergesAfter().nanos())); ======= engine.index(new Engine.Index(newUid("3"), doc, Versions.MATCH_ANY, VersionType.INTERNAL, Engine.Operation.Origin.PRIMARY, System.nanoTime() - engine.engineConfig.getFlushMergesAfter().nanos(), -1, false)); >>>>>>> engine.index(new Engine.Index(newUid("3"), doc, SequenceNumbersService.UNASSIGNED_SEQ_NO, Versions.MATCH_ANY, VersionType.INTERNAL, Engine.Operation.Origin.PRIMARY, System.nanoTime() - engine.engineConfig.getFlushMergesAfter().nanos(), -1, false)); <<<<<<< create = new Engine.Index(newUid("1"), doc, create.seqNo(), create.version(), create.versionType().versionTypeForReplicationAndRecovery(), REPLICA, 0); ======= create = new Engine.Index(newUid("1"), doc, create.version(), create.versionType().versionTypeForReplicationAndRecovery(), REPLICA, 0, -1, false); >>>>>>> create = new Engine.Index(newUid("1"), doc, create.seqNo(), create.version(), create.versionType().versionTypeForReplicationAndRecovery(), REPLICA, 0, -1, false); <<<<<<< index = new Engine.Index(newUid("1"), doc, index.seqNo(), index.version(), index.versionType().versionTypeForReplicationAndRecovery(), REPLICA, 0); ======= index = new Engine.Index(newUid("1"), doc, index.version(), index.versionType().versionTypeForReplicationAndRecovery(), REPLICA, 0, -1, false); >>>>>>> index = new Engine.Index(newUid("1"), doc, index.seqNo(), index.version(), index.versionType().versionTypeForReplicationAndRecovery(), REPLICA, 0, -1, false); <<<<<<< index = new Engine.Index(newUid("1"), doc, SequenceNumbersService.UNASSIGNED_SEQ_NO, 13, VersionType.EXTERNAL, PRIMARY, 0); ======= index = new Engine.Index(newUid("1"), doc, 13, VersionType.EXTERNAL, PRIMARY, 0, -1, false); >>>>>>> index = new Engine.Index(newUid("1"), doc, SequenceNumbersService.UNASSIGNED_SEQ_NO, 13, VersionType.EXTERNAL, PRIMARY, 0, -1, false); <<<<<<< Engine.Index create = new Engine.Index(newUid("1"), doc, SequenceNumbersService.UNASSIGNED_SEQ_NO, Versions.MATCH_DELETED, VersionType.INTERNAL, PRIMARY, 0); ======= Engine.Index create = new Engine.Index(newUid("1"), doc, Versions.MATCH_DELETED, VersionType.INTERNAL, PRIMARY, 0, -1, false); >>>>>>> Engine.Index create = new Engine.Index(newUid("1"), doc, SequenceNumbersService.UNASSIGNED_SEQ_NO, Versions.MATCH_DELETED, VersionType.INTERNAL, PRIMARY, 0, -1, false); <<<<<<< create = new Engine.Index(newUid("1"), doc, SequenceNumbersService.UNASSIGNED_SEQ_NO, Versions.MATCH_DELETED, VersionType.INTERNAL, PRIMARY, 0); ======= create = new Engine.Index(newUid("1"), doc, Versions.MATCH_DELETED, VersionType.INTERNAL, PRIMARY, 0, -1, false); >>>>>>> create = new Engine.Index(newUid("1"), doc, SequenceNumbersService.UNASSIGNED_SEQ_NO, Versions.MATCH_DELETED, VersionType.INTERNAL, PRIMARY, 0, -1, false); <<<<<<< index = new Engine.Index(newUid("1"), doc, index.seqNo(), index.version(), VersionType.INTERNAL.versionTypeForReplicationAndRecovery(), REPLICA, 0); ======= index = new Engine.Index(newUid("1"), doc, index.version(), VersionType.INTERNAL.versionTypeForReplicationAndRecovery(), REPLICA, 0, -1, false); >>>>>>> index = new Engine.Index(newUid("1"), doc, index.seqNo(), index.version(), VersionType.INTERNAL.versionTypeForReplicationAndRecovery(), REPLICA, 0, -1, false); <<<<<<< index = new Engine.Index(newUid("1"), doc, index.seqNo(), 1L, VersionType.INTERNAL.versionTypeForReplicationAndRecovery(), REPLICA, 0); ======= index = new Engine.Index(newUid("1"), doc, 1L, VersionType.INTERNAL.versionTypeForReplicationAndRecovery(), REPLICA, 0, -1, false); >>>>>>> index = new Engine.Index(newUid("1"), doc, index.seqNo(), 1L, VersionType.INTERNAL.versionTypeForReplicationAndRecovery(), REPLICA, 0, -1, false); <<<<<<< index = new Engine.Index(newUid("1"), doc, index.seqNo(), 2L , VersionType.INTERNAL.versionTypeForReplicationAndRecovery(), REPLICA, 0); ======= index = new Engine.Index(newUid("1"), doc, 2L , VersionType.INTERNAL.versionTypeForReplicationAndRecovery(), REPLICA, 0, -1, false); >>>>>>> index = new Engine.Index(newUid("1"), doc, index.seqNo(), 2L , VersionType.INTERNAL.versionTypeForReplicationAndRecovery(), REPLICA, 0, -1, false); <<<<<<< index = new Engine.Index(newUid("1"), doc, index.seqNo(), 1L , VersionType.INTERNAL.versionTypeForReplicationAndRecovery(), REPLICA, 0); ======= index = new Engine.Index(newUid("1"), doc, 1L , VersionType.INTERNAL.versionTypeForReplicationAndRecovery(), REPLICA, 0, -1, false); >>>>>>> index = new Engine.Index(newUid("1"), doc, index.seqNo(), 1L , VersionType.INTERNAL.versionTypeForReplicationAndRecovery(), REPLICA, 0, -1, false); <<<<<<< index = new Engine.Index(newUid("1"), doc, index.seqNo(), 2L, VersionType.INTERNAL.versionTypeForReplicationAndRecovery(), REPLICA, 0); ======= index = new Engine.Index(newUid("1"), doc, 2L, VersionType.INTERNAL.versionTypeForReplicationAndRecovery(), REPLICA, 0, -1, false); >>>>>>> index = new Engine.Index(newUid("1"), doc, index.seqNo(), 2L, VersionType.INTERNAL.versionTypeForReplicationAndRecovery(), REPLICA, 0, -1, false); <<<<<<< engine.index(new Engine.Index(newUid("1"), doc, SequenceNumbersService.UNASSIGNED_SEQ_NO, 1, VersionType.EXTERNAL, Engine.Operation.Origin.PRIMARY, System.nanoTime())); ======= engine.index(new Engine.Index(newUid("1"), doc, 1, VersionType.EXTERNAL, Engine.Operation.Origin.PRIMARY, System.nanoTime(), -1, false)); >>>>>>> engine.index(new Engine.Index(newUid("1"), doc, SequenceNumbersService.UNASSIGNED_SEQ_NO, 1, VersionType.EXTERNAL, Engine.Operation.Origin.PRIMARY, System.nanoTime(), -1, false)); <<<<<<< engine.index(new Engine.Index(newUid("1"), doc, SequenceNumbersService.UNASSIGNED_SEQ_NO, 2, VersionType.EXTERNAL, Engine.Operation.Origin.PRIMARY, System.nanoTime())); ======= engine.index(new Engine.Index(newUid("1"), doc, 2, VersionType.EXTERNAL, Engine.Operation.Origin.PRIMARY, System.nanoTime(), -1, false)); >>>>>>> engine.index(new Engine.Index(newUid("1"), doc, SequenceNumbersService.UNASSIGNED_SEQ_NO, 2, VersionType.EXTERNAL, Engine.Operation.Origin.PRIMARY, System.nanoTime(), -1, false)); <<<<<<< engine.index(new Engine.Index(newUid("2"), doc, SequenceNumbersService.UNASSIGNED_SEQ_NO, 2, VersionType.EXTERNAL, Engine.Operation.Origin.PRIMARY, System.nanoTime())); ======= engine.index(new Engine.Index(newUid("2"), doc, 2, VersionType.EXTERNAL, Engine.Operation.Origin.PRIMARY, System.nanoTime(), -1, false)); >>>>>>> engine.index(new Engine.Index(newUid("2"), doc, SequenceNumbersService.UNASSIGNED_SEQ_NO, 2, VersionType.EXTERNAL, Engine.Operation.Origin.PRIMARY, System.nanoTime(), -1, false)); <<<<<<< ParsedDocument doc = testParsedDocument(Integer.toString(i), Integer.toString(i), "test", null, SequenceNumbersService.UNASSIGNED_SEQ_NO, -1, testDocument(), new BytesArray("{}"), null); Engine.Index firstIndexRequest = new Engine.Index(newUid(Integer.toString(i)), doc, SequenceNumbersService.UNASSIGNED_SEQ_NO, Versions.MATCH_DELETED, VersionType.INTERNAL, PRIMARY, System.nanoTime()); ======= ParsedDocument doc = testParsedDocument(Integer.toString(i), Integer.toString(i), "test", null, -1, -1, testDocument(), new BytesArray("{}"), null); Engine.Index firstIndexRequest = new Engine.Index(newUid(Integer.toString(i)), doc, Versions.MATCH_DELETED, VersionType.INTERNAL, PRIMARY, System.nanoTime(), -1, false); >>>>>>> ParsedDocument doc = testParsedDocument(Integer.toString(i), Integer.toString(i), "test", null, -1, -1, testDocument(), new BytesArray("{}"), null); Engine.Index firstIndexRequest = new Engine.Index(newUid(Integer.toString(i)), doc, SequenceNumbersService.UNASSIGNED_SEQ_NO, Versions.MATCH_DELETED, VersionType.INTERNAL, PRIMARY, System.nanoTime(), -1, false); <<<<<<< Engine.Index firstIndexRequest = new Engine.Index(newUid(Integer.toString(i)), doc, SequenceNumbersService.UNASSIGNED_SEQ_NO, Versions.MATCH_DELETED, VersionType.INTERNAL, PRIMARY, System.nanoTime()); ======= Engine.Index firstIndexRequest = new Engine.Index(newUid(Integer.toString(i)), doc, Versions.MATCH_DELETED, VersionType.INTERNAL, PRIMARY, System.nanoTime(), -1, false); >>>>>>> Engine.Index firstIndexRequest = new Engine.Index(newUid(Integer.toString(i)), doc, SequenceNumbersService.UNASSIGNED_SEQ_NO, Versions.MATCH_DELETED, VersionType.INTERNAL, PRIMARY, System.nanoTime(), -1, false); <<<<<<< Engine.Index firstIndexRequest = new Engine.Index(newUid(Integer.toString(i)), doc, SequenceNumbersService.UNASSIGNED_SEQ_NO, Versions.MATCH_DELETED, VersionType.INTERNAL, PRIMARY, System.nanoTime()); ======= Engine.Index firstIndexRequest = new Engine.Index(newUid(Integer.toString(i)), doc, Versions.MATCH_DELETED, VersionType.INTERNAL, PRIMARY, System.nanoTime(), -1, false); >>>>>>> Engine.Index firstIndexRequest = new Engine.Index(newUid(Integer.toString(i)), doc, SequenceNumbersService.UNASSIGNED_SEQ_NO, Versions.MATCH_DELETED, VersionType.INTERNAL, PRIMARY, System.nanoTime(), -1, false); <<<<<<< Engine.Index firstIndexRequest = new Engine.Index(newUid(Integer.toString(i)), doc, SequenceNumbersService.UNASSIGNED_SEQ_NO, Versions.MATCH_DELETED, VersionType.INTERNAL, PRIMARY, System.nanoTime()); ======= Engine.Index firstIndexRequest = new Engine.Index(newUid(Integer.toString(i)), doc, Versions.MATCH_DELETED, VersionType.INTERNAL, PRIMARY, System.nanoTime(), -1, false); >>>>>>> Engine.Index firstIndexRequest = new Engine.Index(newUid(Integer.toString(i)), doc, SequenceNumbersService.UNASSIGNED_SEQ_NO, Versions.MATCH_DELETED, VersionType.INTERNAL, PRIMARY, System.nanoTime(), -1, false); <<<<<<< Engine.Index firstIndexRequest = new Engine.Index(newUid(uuidValue), doc, SequenceNumbersService.UNASSIGNED_SEQ_NO, 1, VersionType.EXTERNAL, PRIMARY, System.nanoTime()); ======= Engine.Index firstIndexRequest = new Engine.Index(newUid(uuidValue), doc, 1, VersionType.EXTERNAL, PRIMARY, System.nanoTime(), -1, false); >>>>>>> Engine.Index firstIndexRequest = new Engine.Index(newUid(uuidValue), doc, SequenceNumbersService.UNASSIGNED_SEQ_NO, 1, VersionType.EXTERNAL, PRIMARY, System.nanoTime(), -1, false); <<<<<<< Engine.Index idxRequest = new Engine.Index(newUid(uuidValue), doc, SequenceNumbersService.UNASSIGNED_SEQ_NO, 2, VersionType.EXTERNAL, PRIMARY, System.nanoTime()); ======= Engine.Index idxRequest = new Engine.Index(newUid(uuidValue), doc, 2, VersionType.EXTERNAL, PRIMARY, System.nanoTime(), -1, false); >>>>>>> Engine.Index idxRequest = new Engine.Index(newUid(uuidValue), doc, SequenceNumbersService.UNASSIGNED_SEQ_NO, 2, VersionType.EXTERNAL, PRIMARY, System.nanoTime(), -1, false); <<<<<<< Engine.Index firstIndexRequest = new Engine.Index(newUid(Integer.toString(i)), doc, SequenceNumbersService.UNASSIGNED_SEQ_NO, Versions.MATCH_DELETED, VersionType.INTERNAL, PRIMARY, System.nanoTime()); ======= Engine.Index firstIndexRequest = new Engine.Index(newUid(Integer.toString(i)), doc, Versions.MATCH_DELETED, VersionType.INTERNAL, PRIMARY, System.nanoTime(), -1, false); >>>>>>> Engine.Index firstIndexRequest = new Engine.Index(newUid(Integer.toString(i)), doc, SequenceNumbersService.UNASSIGNED_SEQ_NO, Versions.MATCH_DELETED, VersionType.INTERNAL, PRIMARY, System.nanoTime(), -1, false); <<<<<<< Engine.Index firstIndexRequest = new Engine.Index(newUid(Integer.toString(0)), doc, SequenceNumbersService.UNASSIGNED_SEQ_NO, Versions.MATCH_DELETED, VersionType.INTERNAL, PRIMARY, System.nanoTime()); ======= Engine.Index firstIndexRequest = new Engine.Index(newUid(Integer.toString(0)), doc, Versions.MATCH_DELETED, VersionType.INTERNAL, PRIMARY, System.nanoTime(), -1, false); >>>>>>> Engine.Index firstIndexRequest = new Engine.Index(newUid(Integer.toString(0)), doc, SequenceNumbersService.UNASSIGNED_SEQ_NO, Versions.MATCH_DELETED, VersionType.INTERNAL, PRIMARY, System.nanoTime(), -1, false); <<<<<<< Engine.Index firstIndexRequest = new Engine.Index(newUid(Integer.toString(i)), doc, SequenceNumbersService.UNASSIGNED_SEQ_NO, Versions.MATCH_ANY, VersionType.INTERNAL, PRIMARY, System.nanoTime()); ======= Engine.Index firstIndexRequest = new Engine.Index(newUid(Integer.toString(i)), doc, Versions.MATCH_ANY, VersionType.INTERNAL, PRIMARY, System.nanoTime(), -1, false); >>>>>>> Engine.Index firstIndexRequest = new Engine.Index(newUid(Integer.toString(i)), doc, SequenceNumbersService.UNASSIGNED_SEQ_NO, Versions.MATCH_ANY, VersionType.INTERNAL, PRIMARY, System.nanoTime(), -1, false); <<<<<<< Engine.Index firstIndexRequest = new Engine.Index(newUid(Integer.toString(0)), doc, SequenceNumbersService.UNASSIGNED_SEQ_NO, Versions.MATCH_ANY, VersionType.INTERNAL, PRIMARY, System.nanoTime()); ======= Engine.Index firstIndexRequest = new Engine.Index(newUid(Integer.toString(0)), doc, Versions.MATCH_ANY, VersionType.INTERNAL, PRIMARY, System.nanoTime(), -1, false); >>>>>>> Engine.Index firstIndexRequest = new Engine.Index(newUid(Integer.toString(0)), doc, SequenceNumbersService.UNASSIGNED_SEQ_NO, Versions.MATCH_ANY, VersionType.INTERNAL, PRIMARY, System.nanoTime(), -1, false);
<<<<<<< import com.carrotsearch.hppc.ObjectObjectAssociativeContainer; ======= >>>>>>> <<<<<<< private final FetchPhase fetchPhase; ======= private SearchLookup searchLookup; >>>>>>> private SearchLookup searchLookup; private final FetchPhase fetchPhase; <<<<<<< this.fetchPhase = null; ======= this.queryShardContext = queryShardContext; >>>>>>> this.queryShardContext = queryShardContext; this.fetchPhase = null;
<<<<<<< }, settingsModule , scriptModule, new IndicesModule(namedWriteableRegistry, Collections.emptyList()) { @Override protected void configure() { bindMapperExtension(); } }, new SearchModule(settings, namedWriteableRegistry) { @Override protected void configureSearch() { // Skip me } }, new IndexSettingsModule(index, settings), new AbstractModule() { @Override protected void configure() { bind(ClusterService.class).toProvider(Providers.of(clusterService)); bind(CircuitBreakerService.class).to(NoneCircuitBreakerService.class); bind(NamedWriteableRegistry.class).toInstance(namedWriteableRegistry); } }).createInjector(); ======= b.bind(ScriptService.class).toInstance(scriptModule.getScriptService()); }, settingsModule, new IndicesModule(namedWriteableRegistry) { @Override protected void configure() { bindMapperExtension(); } }, new SearchModule(settings, namedWriteableRegistry) { @Override protected void configureSearch() { // Skip me } }, new IndexSettingsModule(index, settings), new AbstractModule() { @Override protected void configure() { bind(ClusterService.class).toInstance(clusterService); bind(CircuitBreakerService.class).toInstance(new NoneCircuitBreakerService()); bind(NamedWriteableRegistry.class).toInstance(namedWriteableRegistry); } }).createInjector(); >>>>>>> b.bind(ScriptService.class).toInstance(scriptModule.getScriptService()); }, settingsModule, new IndicesModule(namedWriteableRegistry, Collections.emptyList()) { @Override protected void configure() { bindMapperExtension(); } }, new SearchModule(settings, namedWriteableRegistry) { @Override protected void configureSearch() { // Skip me } }, new IndexSettingsModule(index, settings), new AbstractModule() { @Override protected void configure() { bind(ClusterService.class).toInstance(clusterService); bind(CircuitBreakerService.class).toInstance(new NoneCircuitBreakerService()); bind(NamedWriteableRegistry.class).toInstance(namedWriteableRegistry); } }).createInjector();
<<<<<<< public static class PutFieldValuesScriptPlugin extends Plugin { public void onModule(ScriptModule module) { module.addScriptEngine(new ScriptEngineRegistry.ScriptEngineRegistration(PutFieldValuesScriptEngine.class, PutFieldValuesScriptEngine.NAME, true)); ======= public static class PutFieldValuesScriptPlugin extends Plugin implements ScriptPlugin { public PutFieldValuesScriptPlugin() { } @Override public String name() { return PutFieldValuesScriptEngine.NAME; } @Override public String description() { return "Mock script engine for " + UpdateIT.class; } @Override public ScriptEngineService getScriptEngineService(Settings settings) { return new PutFieldValuesScriptEngine(); >>>>>>> public static class PutFieldValuesScriptPlugin extends Plugin implements ScriptPlugin { @Override public ScriptEngineService getScriptEngineService(Settings settings) { return new PutFieldValuesScriptEngine(); <<<<<<< public static class FieldIncrementScriptPlugin extends Plugin { public void onModule(ScriptModule module) { module.addScriptEngine(new ScriptEngineRegistry.ScriptEngineRegistration(FieldIncrementScriptEngine.class, FieldIncrementScriptEngine.NAME, true)); ======= public static class FieldIncrementScriptPlugin extends Plugin implements ScriptPlugin { public FieldIncrementScriptPlugin() { } @Override public String name() { return FieldIncrementScriptEngine.NAME; } @Override public String description() { return "Mock script engine for " + UpdateIT.class; } @Override public ScriptEngineService getScriptEngineService(Settings settings) { return new FieldIncrementScriptEngine(); >>>>>>> public static class FieldIncrementScriptPlugin extends Plugin implements ScriptPlugin { @Override public ScriptEngineService getScriptEngineService(Settings settings) { return new FieldIncrementScriptEngine(); <<<<<<< public static class ScriptedUpsertScriptPlugin extends Plugin { public void onModule(ScriptModule module) { module.addScriptEngine(new ScriptEngineRegistry.ScriptEngineRegistration(ScriptedUpsertScriptEngine.class, ScriptedUpsertScriptEngine.NAME, true)); ======= public static class ScriptedUpsertScriptPlugin extends Plugin implements ScriptPlugin { public ScriptedUpsertScriptPlugin() { } @Override public String name() { return ScriptedUpsertScriptEngine.NAME; } @Override public String description() { return "Mock script engine for " + UpdateIT.class + ".testScriptedUpsert"; } @Override public ScriptEngineService getScriptEngineService(Settings settings) { return new ScriptedUpsertScriptEngine(); >>>>>>> public static class ScriptedUpsertScriptPlugin extends Plugin implements ScriptPlugin { @Override public ScriptEngineService getScriptEngineService(Settings settings) { return new ScriptedUpsertScriptEngine(); <<<<<<< public static class ExtractContextInSourceScriptPlugin extends Plugin { public void onModule(ScriptModule module) { module.addScriptEngine(new ScriptEngineRegistry.ScriptEngineRegistration(ExtractContextInSourceScriptEngine.class, ExtractContextInSourceScriptEngine.NAME, true)); ======= public static class ExtractContextInSourceScriptPlugin extends Plugin implements ScriptPlugin { public ExtractContextInSourceScriptPlugin() { } @Override public String name() { return ExtractContextInSourceScriptEngine.NAME; } @Override public String description() { return "Mock script engine for " + UpdateIT.class; } @Override public ScriptEngineService getScriptEngineService(Settings settings) { return new ExtractContextInSourceScriptEngine(); >>>>>>> public static class ExtractContextInSourceScriptPlugin extends Plugin implements ScriptPlugin { @Override public ScriptEngineService getScriptEngineService(Settings settings) { return new ExtractContextInSourceScriptEngine();
<<<<<<< import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; import com.carrotsearch.hppc.ObjectObjectAssociativeContainer; ======= >>>>>>> import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; <<<<<<< import com.carrotsearch.hppc.ObjectObjectAssociativeContainer; ======= import java.util.HashMap; import java.util.List; import java.util.Map; >>>>>>> import java.util.HashMap; import java.util.List; import java.util.Map;
<<<<<<< import org.apache.lucene.search.Query; import org.elasticsearch.Version; import org.elasticsearch.common.geo.GeoHashUtils; ======= >>>>>>> import org.apache.lucene.search.Query; import org.elasticsearch.Version;
<<<<<<< .addAggregation(histogram("histo").field("value").interval(1l).minDocCount(0) .subAggregation(nested("nested", "nested"))) ======= .addAggregation(histogram("histo").field("value").interval(1L).minDocCount(0) .subAggregation(nested("nested").path("nested"))) >>>>>>> .addAggregation(histogram("histo").field("value").interval(1L).minDocCount(0) .subAggregation(nested("nested", "nested")))
<<<<<<< public enum SettingsProperty { /** * should be filtered in some api (mask password/credentials) */ Filtered, /** * iff this setting can be dynamically updateable */ Dynamic, /** * mark this setting as deprecated */ Deprecated, /** * Cluster scope. * @See IndexScope * @See NodeScope */ ClusterScope, /** * Node scope. * @See ClusterScope * @See IndexScope */ NodeScope, /** * Index scope. * @See ClusterScope * @See NodeScope */ IndexScope; } private static final ESLogger logger = Loggers.getLogger(Setting.class); private static final DeprecationLogger deprecationLogger = new DeprecationLogger(logger); private final String key; ======= private final Key key; >>>>>>> public enum SettingsProperty { /** * should be filtered in some api (mask password/credentials) */ Filtered, /** * iff this setting can be dynamically updateable */ Dynamic, /** * mark this setting as deprecated */ Deprecated, /** * Cluster scope. * @See IndexScope * @See NodeScope */ ClusterScope, /** * Node scope. * @See ClusterScope * @See IndexScope */ NodeScope, /** * Index scope. * @See ClusterScope * @See NodeScope */ IndexScope; } private static final ESLogger logger = Loggers.getLogger(Setting.class); private static final DeprecationLogger deprecationLogger = new DeprecationLogger(logger); private final Key key; <<<<<<< public Setting(String key, Function<Settings, String> defaultValue, Function<String, T> parser, SettingsProperty... properties) { ======= public Setting(Key key, Function<Settings, String> defaultValue, Function<String, T> parser, boolean dynamic, Scope scope) { >>>>>>> public Setting(Key key, Function<Settings, String> defaultValue, Function<String, T> parser, SettingsProperty... properties) { <<<<<<< // They're using the setting, so we need to tell them to stop if (this.isDeprecated() && this.exists(settings)) { // It would be convenient to show its replacement key, but replacement is often not so simple deprecationLogger.deprecated("[{}] setting was deprecated in Elasticsearch and it will be removed in a future release! " + "See the breaking changes lists in the documentation for details", getKey()); } return settings.get(key, defaultValue.apply(settings)); ======= return settings.get(getKey(), defaultValue.apply(settings)); >>>>>>> // They're using the setting, so we need to tell them to stop if (this.isDeprecated() && this.exists(settings)) { // It would be convenient to show its replacement key, but replacement is often not so simple deprecationLogger.deprecated("[{}] setting was deprecated in Elasticsearch and it will be removed in a future release! " + "See the breaking changes lists in the documentation for details", getKey()); } return settings.get(getKey(), defaultValue.apply(settings)); <<<<<<< builder.field("key", key); builder.field("properties", properties); ======= builder.field("key", key.toString()); builder.field("type", scope.name()); builder.field("dynamic", dynamic); >>>>>>> builder.field("key", key.toString()); builder.field("properties", properties); <<<<<<< public static Setting<Integer> intSetting(String key, int defaultValue, SettingsProperty... properties) { return intSetting(key, defaultValue, Integer.MIN_VALUE, properties); ======= public static TimeValue parseTimeValue(String s, TimeValue minValue, String key) { TimeValue timeValue = TimeValue.parseTimeValue(s, null, key); if (timeValue.millis() < minValue.millis()) { throw new IllegalArgumentException("Failed to parse value [" + s + "] for setting [" + key + "] must be >= " + minValue); } return timeValue; } public static Setting<Integer> intSetting(String key, int defaultValue, boolean dynamic, Scope scope) { return intSetting(key, defaultValue, Integer.MIN_VALUE, dynamic, scope); >>>>>>> public static TimeValue parseTimeValue(String s, TimeValue minValue, String key) { TimeValue timeValue = TimeValue.parseTimeValue(s, null, key); if (timeValue.millis() < minValue.millis()) { throw new IllegalArgumentException("Failed to parse value [" + s + "] for setting [" + key + "] must be >= " + minValue); } return timeValue; } public static Setting<Integer> intSetting(String key, int defaultValue, SettingsProperty... properties) { return intSetting(key, defaultValue, Integer.MIN_VALUE, properties); <<<<<<< return new Setting<List<T>>(key, (s) -> arrayToParsableString(defaultStringValue.apply(s).toArray(Strings.EMPTY_ARRAY)), parser, properties) { private final Pattern pattern = Pattern.compile(Pattern.quote(key)+"(\\.\\d+)?"); ======= return new Setting<List<T>>(new ListKey(key), (s) -> arrayToParsableString(defaultStringValue.apply(s).toArray(Strings.EMPTY_ARRAY)), parser, dynamic, scope) { >>>>>>> return new Setting<List<T>>(new ListKey(key), (s) -> arrayToParsableString(defaultStringValue.apply(s).toArray(Strings.EMPTY_ARRAY)), parser, properties) { private final Pattern pattern = Pattern.compile(Pattern.quote(key)+"(\\.\\d+)?"); <<<<<<< public static Setting<Settings> groupSetting(String key, SettingsProperty... properties) { if (key.endsWith(".") == false) { throw new IllegalArgumentException("key must end with a '.'"); } return new Setting<Settings>(key, "", (s) -> null, properties) { ======= public static Setting<Settings> groupSetting(String key, boolean dynamic, Scope scope) { return new Setting<Settings>(new GroupKey(key), (s) -> "", (s) -> null, dynamic, scope) { >>>>>>> public static Setting<Settings> groupSetting(String key, SettingsProperty... properties) { // TODO CHECK IF WE REMOVE if (key.endsWith(".") == false) { throw new IllegalArgumentException("key must end with a '.'"); } // TODO CHECK IF WE REMOVE -END return new Setting<Settings>(new GroupKey(key), (s) -> "", (s) -> null, properties) { <<<<<<< public static Setting<TimeValue> timeSetting(String key, Function<Settings, String> defaultValue, TimeValue minValue, SettingsProperty... properties) { return new Setting<>(key, defaultValue, (s) -> { TimeValue timeValue = TimeValue.parseTimeValue(s, null, key); if (timeValue.millis() < minValue.millis()) { throw new IllegalArgumentException("Failed to parse value [" + s + "] for setting [" + key + "] must be >= " + minValue); } return timeValue; }, properties); ======= public static Setting<TimeValue> timeSetting(String key, Function<Settings, String> defaultValue, TimeValue minValue, boolean dynamic, Scope scope) { return new Setting<>(key, defaultValue, (s) -> parseTimeValue(s, minValue, key), dynamic, scope); >>>>>>> public static Setting<TimeValue> timeSetting(String key, Function<Settings, String> defaultValue, TimeValue minValue, SettingsProperty... properties) { return new Setting<>(key, defaultValue, (s) -> { TimeValue timeValue = TimeValue.parseTimeValue(s, null, key); if (timeValue.millis() < minValue.millis()) { throw new IllegalArgumentException("Failed to parse value [" + s + "] for setting [" + key + "] must be >= " + minValue); } return timeValue; }, properties);
<<<<<<< ======= import org.apache.lucene.search.Query; import org.elasticsearch.common.ParsingException; >>>>>>> import org.elasticsearch.common.ParsingException; <<<<<<< public QueryBuilder fromXContent(QueryParseContext parseContext) throws IOException, QueryParsingException { ======= public Query parse(QueryParseContext parseContext) throws IOException, ParsingException { >>>>>>> public QueryBuilder fromXContent(QueryParseContext parseContext) throws IOException {
<<<<<<< ======= import org.elasticsearch.common.Nullable; import org.elasticsearch.common.Randomness; import org.elasticsearch.common.collect.MapBuilder; import org.elasticsearch.common.collect.Tuple; import org.elasticsearch.common.component.Lifecycle; import org.elasticsearch.common.component.LifecycleListener; import org.elasticsearch.common.io.stream.BytesStreamOutput; import org.elasticsearch.common.lease.Releasable; import org.elasticsearch.common.settings.ClusterSettings; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.transport.BoundTransportAddress; import org.elasticsearch.common.transport.TransportAddress; >>>>>>> <<<<<<< ======= public TransportService createCapturingTransportService(Settings settings, ThreadPool threadPool, TransportInterceptor interceptor, Function<BoundTransportAddress, DiscoveryNode> localNodeFactory, @Nullable ClusterSettings clusterSettings, Set<String> taskHeaders) { StubbableConnectionManager connectionManager = new StubbableConnectionManager(new ConnectionManager(settings, this, threadPool), settings, this, threadPool); connectionManager.setDefaultNodeConnectedBehavior((cm, discoveryNode) -> nodeConnected(discoveryNode)); connectionManager.setDefaultGetConnectionBehavior((cm, discoveryNode) -> createConnection(discoveryNode)); return new TransportService(settings, this, threadPool, interceptor, localNodeFactory, clusterSettings, taskHeaders, connectionManager); } >>>>>>>
<<<<<<< public void onModule(SettingsModule module) { module.registerSetting(EXCEPTION_TOP_LEVEL_RATIO_SETTING); module.registerSetting(EXCEPTION_LOW_LEVEL_RATIO_SETTING); ======= @Override public String name() { return "random-exception-reader-wrapper"; } @Override public List<Setting<?>> getSettings() { return Arrays.asList(EXCEPTION_TOP_LEVEL_RATIO_SETTING, EXCEPTION_LOW_LEVEL_RATIO_SETTING); >>>>>>> @Override public List<Setting<?>> getSettings() { return Arrays.asList(EXCEPTION_TOP_LEVEL_RATIO_SETTING, EXCEPTION_LOW_LEVEL_RATIO_SETTING);
<<<<<<< SettingsModule settingsModule = new SettingsModule(settings); settingsModule.registerSetting(InternalSettingsPlugin.VERSION_CREATED); ScriptModule scriptModule = new ScriptModule() { @Override protected void configure() { Settings settings = Settings.builder().put(Environment.PATH_HOME_SETTING.getKey(), createTempDir()) // no file watching, so we don't need a // ResourceWatcherService .put(ScriptService.SCRIPT_AUTO_RELOAD_ENABLED_SETTING.getKey(), false).build(); MockScriptEngine mockScriptEngine = new MockScriptEngine(); Multibinder<ScriptEngineService> multibinder = Multibinder.newSetBinder(binder(), ScriptEngineService.class); multibinder.addBinding().toInstance(mockScriptEngine); Set<ScriptEngineService> engines = new HashSet<>(); engines.add(mockScriptEngine); List<ScriptContext.Plugin> customContexts = new ArrayList<>(); ScriptEngineRegistry scriptEngineRegistry = new ScriptEngineRegistry(Collections .singletonList(new ScriptEngineRegistry.ScriptEngineRegistration(MockScriptEngine.class, MockScriptEngine.NAME, true))); bind(ScriptEngineRegistry.class).toInstance(scriptEngineRegistry); ScriptContextRegistry scriptContextRegistry = new ScriptContextRegistry(customContexts); bind(ScriptContextRegistry.class).toInstance(scriptContextRegistry); ScriptSettings scriptSettings = new ScriptSettings(scriptEngineRegistry, scriptContextRegistry); bind(ScriptSettings.class).toInstance(scriptSettings); try { ScriptService scriptService = new ScriptService(settings, new Environment(settings), engines, null, scriptEngineRegistry, scriptContextRegistry, scriptSettings); bind(ScriptService.class).toInstance(scriptService); } catch (IOException e) { throw new IllegalStateException("error while binding ScriptService", e); } } }; scriptModule.prepareSettings(settingsModule); injector = new ModulesBuilder().add(new EnvironmentModule(new Environment(settings)), settingsModule, new ThreadPoolModule(threadPool), scriptModule, new IndicesModule(namedWriteableRegistry) { ======= ScriptModule scriptModule = newTestScriptModule(); List<Setting<?>> scriptSettings = scriptModule.getSettings(); scriptSettings.add(InternalSettingsPlugin.VERSION_CREATED); SettingsModule settingsModule = new SettingsModule(settings, scriptSettings, Collections.emptyList()); injector = new ModulesBuilder().add(new EnvironmentModule(new Environment(settings), threadPool), settingsModule , scriptModule, new IndicesModule() { >>>>>>> ScriptModule scriptModule = newTestScriptModule(); List<Setting<?>> scriptSettings = scriptModule.getSettings(); scriptSettings.add(InternalSettingsPlugin.VERSION_CREATED); SettingsModule settingsModule = new SettingsModule(settings, scriptSettings, Collections.emptyList()); injector = new ModulesBuilder().add(new EnvironmentModule(new Environment(settings), threadPool), settingsModule , scriptModule, new IndicesModule(namedWriteableRegistry) {
<<<<<<< import org.apache.lucene.util.GeoHashUtils; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.ParseFieldMatcher; ======= import org.apache.lucene.spatial.util.GeoHashUtils; >>>>>>> import org.apache.lucene.spatial.util.GeoHashUtils; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.ParseFieldMatcher;
<<<<<<< import org.elasticsearch.action.search.SearchResponse; ======= import org.elasticsearch.action.admin.cluster.state.ClusterStateResponse; >>>>>>> import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.action.admin.cluster.state.ClusterStateResponse;
<<<<<<< import com.google.common.collect.Lists; ======= import com.google.common.collect.ImmutableList; >>>>>>> <<<<<<< import java.util.Collections; ======= import java.util.ArrayList; >>>>>>> import java.util.ArrayList; import java.util.Collections;
<<<<<<< long term = randomInt(200); ShardRouting routing = TestShardRouting.newShardRouting("foo", 1, "node_1", null, null, term, false, ShardRoutingState.INITIALIZING, 1); ======= ShardRouting routing = TestShardRouting.newShardRouting("foo", 1, "node_1", null, null, false, ShardRoutingState.INITIALIZING); >>>>>>> long term = randomInt(200); ShardRouting routing = TestShardRouting.newShardRouting("foo", 1, "node_1", null, null, term, false, ShardRoutingState.INITIALIZING); <<<<<<< long term = randomInt(200); ShardRouting unassignedShard0 = TestShardRouting.newShardRouting("test", 0, null, term, false, ShardRoutingState.UNASSIGNED, 1); ShardRouting unassignedShard1 = TestShardRouting.newShardRouting("test", 1, null, term, false, ShardRoutingState.UNASSIGNED, 1); ShardRouting initializingShard0 = TestShardRouting.newShardRouting("test", 0, "1", term, randomBoolean(), ShardRoutingState.INITIALIZING, 1); ShardRouting initializingShard1 = TestShardRouting.newShardRouting("test", 1, "1", term, randomBoolean(), ShardRoutingState.INITIALIZING, 1); ======= ShardRouting unassignedShard0 = TestShardRouting.newShardRouting("test", 0, null, false, ShardRoutingState.UNASSIGNED); ShardRouting unassignedShard1 = TestShardRouting.newShardRouting("test", 1, null, false, ShardRoutingState.UNASSIGNED); ShardRouting initializingShard0 = TestShardRouting.newShardRouting("test", 0, "1", randomBoolean(), ShardRoutingState.INITIALIZING); ShardRouting initializingShard1 = TestShardRouting.newShardRouting("test", 1, "1", randomBoolean(), ShardRoutingState.INITIALIZING); >>>>>>> long term = randomInt(200); ShardRouting unassignedShard0 = TestShardRouting.newShardRouting("test", 0, null, term, false, ShardRoutingState.UNASSIGNED); ShardRouting unassignedShard1 = TestShardRouting.newShardRouting("test", 1, null, term, false, ShardRoutingState.UNASSIGNED); ShardRouting initializingShard0 = TestShardRouting.newShardRouting("test", 0, "1", term, randomBoolean(), ShardRoutingState.INITIALIZING); ShardRouting initializingShard1 = TestShardRouting.newShardRouting("test", 1, "1", term, randomBoolean(), ShardRoutingState.INITIALIZING); <<<<<<< return TestShardRouting.newShardRouting(index, shard, state == ShardRoutingState.UNASSIGNED ? null : "1", randomInt(200), state != ShardRoutingState.UNASSIGNED && randomBoolean(), state, randomInt(5)); ======= return TestShardRouting.newShardRouting(index, shard, state == ShardRoutingState.UNASSIGNED ? null : "1", state != ShardRoutingState.UNASSIGNED && randomBoolean(), state); >>>>>>> return TestShardRouting.newShardRouting(index, shard, state == ShardRoutingState.UNASSIGNED ? null : "1", randomInt(200), state != ShardRoutingState.UNASSIGNED && randomBoolean(), state); <<<<<<< ShardRouting unassignedShard0 = TestShardRouting.newShardRouting("test", 0, null, randomInt(200), false, ShardRoutingState.UNASSIGNED, 1); ShardRouting initializingShard0 = TestShardRouting.newShardRouting("test", 0, "node1", randomInt(200), randomBoolean(), ShardRoutingState.INITIALIZING, 1); ShardRouting initializingShard1 = TestShardRouting.newShardRouting("test", 1, "node1", randomInt(200), randomBoolean(), ShardRoutingState.INITIALIZING, 1); ======= ShardRouting unassignedShard0 = TestShardRouting.newShardRouting("test", 0, null, false, ShardRoutingState.UNASSIGNED); ShardRouting initializingShard0 = TestShardRouting.newShardRouting("test", 0, "node1", randomBoolean(), ShardRoutingState.INITIALIZING); ShardRouting initializingShard1 = TestShardRouting.newShardRouting("test", 1, "node1", randomBoolean(), ShardRoutingState.INITIALIZING); >>>>>>> ShardRouting unassignedShard0 = TestShardRouting.newShardRouting("test", 0, null, randomInt(200),false, ShardRoutingState.UNASSIGNED); ShardRouting initializingShard0 = TestShardRouting.newShardRouting("test", 0, "node1", randomInt(200), randomBoolean(), ShardRoutingState.INITIALIZING); ShardRouting initializingShard1 = TestShardRouting.newShardRouting("test", 1, "node1", randomInt(200), randomBoolean(), ShardRoutingState.INITIALIZING); <<<<<<< otherRouting = new ShardRouting(routing, randomBoolean() ? routing.version() : routing.version() + 1, randomBoolean() ? routing.primaryTerm() : routing.primaryTerm() + 1); ======= otherRouting = new ShardRouting(routing); >>>>>>> otherRouting = new ShardRouting(routing,randomBoolean() ? routing.primaryTerm() : routing.primaryTerm() + 1); <<<<<<< otherRouting = TestShardRouting.newShardRouting(otherRouting.index() + "a", otherRouting.id(), otherRouting.currentNodeId(), otherRouting.relocatingNodeId(), otherRouting.restoreSource(), otherRouting.primaryTerm(), otherRouting.primary(), otherRouting.state(), otherRouting.version(), otherRouting.unassignedInfo()); ======= otherRouting = TestShardRouting.newShardRouting(otherRouting.getIndexName() + "a", otherRouting.id(), otherRouting.currentNodeId(), otherRouting.relocatingNodeId(), otherRouting.restoreSource(), otherRouting.primary(), otherRouting.state(), otherRouting.unassignedInfo()); >>>>>>> otherRouting = TestShardRouting.newShardRouting(otherRouting.getIndexName() + "a", otherRouting.id(), otherRouting.currentNodeId(), otherRouting.relocatingNodeId(), otherRouting.restoreSource(), otherRouting.primaryTerm(), otherRouting.primary(), otherRouting.state(), otherRouting.unassignedInfo()); <<<<<<< otherRouting = TestShardRouting.newShardRouting(otherRouting.index(), otherRouting.id() + 1, otherRouting.currentNodeId(), otherRouting.relocatingNodeId(), otherRouting.restoreSource(), otherRouting.primaryTerm(), otherRouting.primary(), otherRouting.state(), otherRouting.version(), otherRouting.unassignedInfo()); ======= otherRouting = TestShardRouting.newShardRouting(otherRouting.getIndexName(), otherRouting.id() + 1, otherRouting.currentNodeId(), otherRouting.relocatingNodeId(), otherRouting.restoreSource(), otherRouting.primary(), otherRouting.state(), otherRouting.unassignedInfo()); >>>>>>> otherRouting = TestShardRouting.newShardRouting(otherRouting.getIndexName(), otherRouting.id() + 1, otherRouting.currentNodeId(), otherRouting.relocatingNodeId(), otherRouting.restoreSource(), otherRouting.primaryTerm(), otherRouting.primary(), otherRouting.state(), otherRouting.unassignedInfo()); <<<<<<< otherRouting = TestShardRouting.newShardRouting(otherRouting.index(), otherRouting.id(), otherRouting.currentNodeId() == null ? "1" : otherRouting.currentNodeId() + "_1", otherRouting.relocatingNodeId(), otherRouting.restoreSource(), otherRouting.primaryTerm(), otherRouting.primary(), otherRouting.state(), otherRouting.version(), otherRouting.unassignedInfo()); ======= otherRouting = TestShardRouting.newShardRouting(otherRouting.getIndexName(), otherRouting.id(), otherRouting.currentNodeId() == null ? "1" : otherRouting.currentNodeId() + "_1", otherRouting.relocatingNodeId(), otherRouting.restoreSource(), otherRouting.primary(), otherRouting.state(), otherRouting.unassignedInfo()); >>>>>>> otherRouting = TestShardRouting.newShardRouting(otherRouting.getIndexName(), otherRouting.id(), otherRouting.currentNodeId() == null ? "1" : otherRouting.currentNodeId() + "_1", otherRouting.relocatingNodeId(), otherRouting.restoreSource(), otherRouting.primaryTerm(), otherRouting.primary(), otherRouting.state(), otherRouting.unassignedInfo()); <<<<<<< otherRouting.restoreSource(), otherRouting.primaryTerm(), otherRouting.primary(), otherRouting.state(), otherRouting.version(), otherRouting.unassignedInfo()); ======= otherRouting.restoreSource(), otherRouting.primary(), otherRouting.state(), otherRouting.unassignedInfo()); >>>>>>> otherRouting.restoreSource(), otherRouting.primaryTerm(), otherRouting.primary(), otherRouting.state(), otherRouting.unassignedInfo()); <<<<<<< otherRouting.primaryTerm(), otherRouting.primary(), otherRouting.state(), otherRouting.version(), otherRouting.unassignedInfo()); ======= otherRouting.primary(), otherRouting.state(), otherRouting.unassignedInfo()); >>>>>>> otherRouting.primaryTerm(), otherRouting.primary(), otherRouting.state(), otherRouting.unassignedInfo()); <<<<<<< otherRouting = TestShardRouting.newShardRouting(otherRouting.index(), otherRouting.id(), otherRouting.currentNodeId(), otherRouting.relocatingNodeId(), otherRouting.restoreSource(), otherRouting.primaryTerm(), otherRouting.primary() == false, otherRouting.state(), otherRouting.version(), otherRouting.unassignedInfo()); ======= otherRouting = TestShardRouting.newShardRouting(otherRouting.getIndexName(), otherRouting.id(), otherRouting.currentNodeId(), otherRouting.relocatingNodeId(), otherRouting.restoreSource(), otherRouting.primary() == false, otherRouting.state(), otherRouting.unassignedInfo()); >>>>>>> otherRouting = TestShardRouting.newShardRouting(otherRouting.getIndexName(), otherRouting.id(), otherRouting.currentNodeId(), otherRouting.relocatingNodeId(), otherRouting.restoreSource(), otherRouting.primaryTerm(), otherRouting.primary() == false, otherRouting.state(), otherRouting.unassignedInfo()); <<<<<<< otherRouting = TestShardRouting.newShardRouting(otherRouting.index(), otherRouting.id(), otherRouting.currentNodeId(), otherRouting.relocatingNodeId(), otherRouting.restoreSource(), otherRouting.primaryTerm(), otherRouting.primary(), newState, otherRouting.version(), unassignedInfo); ======= otherRouting = TestShardRouting.newShardRouting(otherRouting.getIndexName(), otherRouting.id(), otherRouting.currentNodeId(), otherRouting.relocatingNodeId(), otherRouting.restoreSource(), otherRouting.primary(), newState, unassignedInfo); >>>>>>> otherRouting = TestShardRouting.newShardRouting(otherRouting.getIndexName(), otherRouting.id(), otherRouting.currentNodeId(), otherRouting.relocatingNodeId(), otherRouting.restoreSource(), otherRouting.primaryTerm(), otherRouting.primary(), newState, unassignedInfo); <<<<<<< // change version otherRouting = new ShardRouting(otherRouting, otherRouting.version() + 1, otherRouting.primaryTerm()); } if (randomBoolean()) { // increase term otherRouting = new ShardRouting(otherRouting, otherRouting.version(), otherRouting.primaryTerm() + 1); } if (randomBoolean()) { ======= >>>>>>> // increase term otherRouting = new ShardRouting(otherRouting, otherRouting.primaryTerm() + 1); } if (randomBoolean()) { <<<<<<< otherRouting = TestShardRouting.newShardRouting(otherRouting.index(), otherRouting.id(), otherRouting.currentNodeId(), otherRouting.relocatingNodeId(), otherRouting.restoreSource(), otherRouting.primaryTerm(), otherRouting.primary(), otherRouting.state(), otherRouting.version(), ======= otherRouting = TestShardRouting.newShardRouting(otherRouting.getIndexName(), otherRouting.id(), otherRouting.currentNodeId(), otherRouting.relocatingNodeId(), otherRouting.restoreSource(), otherRouting.primary(), otherRouting.state(), >>>>>>> otherRouting = TestShardRouting.newShardRouting(otherRouting.getIndexName(), otherRouting.id(), otherRouting.currentNodeId(), otherRouting.relocatingNodeId(), otherRouting.restoreSource(), otherRouting.primaryTerm(), otherRouting.primary(), otherRouting.state(),
<<<<<<< import org.elasticsearch.action.fieldstats.FieldStats; ======= import org.elasticsearch.Version; import org.elasticsearch.action.index.IndexRequest; >>>>>>> import org.elasticsearch.Version; import org.elasticsearch.action.fieldstats.FieldStats; import org.elasticsearch.action.index.IndexRequest; <<<<<<< import static org.elasticsearch.index.seqno.SequenceNumbersService.NO_OPS_PERFORMED; /** * */ ======= >>>>>>> import static org.elasticsearch.index.seqno.SequenceNumbersService.NO_OPS_PERFORMED; <<<<<<< private void maybeUpdateSequenceNumber(Engine.Operation op) { if (op.origin() == Operation.Origin.PRIMARY) { op.updateSeqNo(seqNoService.generateSeqNo()); } } private static VersionValueSupplier NEW_VERSION_VALUE = (u, t, l) -> new VersionValue(u, l); ======= private static VersionValueSupplier NEW_VERSION_VALUE = (u, t) -> new VersionValue(u); >>>>>>> private void maybeUpdateSequenceNumber(Engine.Operation op) { if (op.origin() == Operation.Origin.PRIMARY) { op.updateSeqNo(seqNoService.generateSeqNo()); } } private static VersionValueSupplier NEW_VERSION_VALUE = (u, t) -> new VersionValue(u); <<<<<<< if (checkVersionConflict(index, currentVersion, expectedVersion, deleted)) return false; maybeUpdateSequenceNumber(index); ======= if (checkVersionConflict(index, currentVersion, expectedVersion, deleted)) { index.setCreated(false); return; } >>>>>>> if (checkVersionConflict(index, currentVersion, expectedVersion, deleted)) { index.setCreated(false); return; } maybeUpdateSequenceNumber(index); <<<<<<< final boolean created = indexOrUpdate(index, currentVersion, versionValue); ======= index.setCreated(deleted); if (currentVersion == Versions.NOT_FOUND && forceUpdateDocument == false) { // document does not exists, we can optimize for create index(index, indexWriter); } else { update(index, indexWriter); } >>>>>>> index.setCreated(deleted); if (currentVersion == Versions.NOT_FOUND && forceUpdateDocument == false) { // document does not exists, we can optimize for create index(index, indexWriter); } else { update(index, indexWriter); }
<<<<<<< public class TopChildrenQueryParser extends BaseQueryParserTemp { ======= @Deprecated public class TopChildrenQueryParser implements QueryParser { >>>>>>> @Deprecated public class TopChildrenQueryParser extends BaseQueryParserTemp {
<<<<<<< ======= import org.apache.lucene.queries.BoostingQuery; import org.apache.lucene.search.Query; import org.elasticsearch.common.ParsingException; >>>>>>> import org.elasticsearch.common.ParsingException; <<<<<<< public BoostingQueryBuilder fromXContent(QueryParseContext parseContext) throws IOException, QueryParsingException { ======= public Query parse(QueryParseContext parseContext) throws IOException, ParsingException { >>>>>>> public BoostingQueryBuilder fromXContent(QueryParseContext parseContext) throws IOException {
<<<<<<< return new ShardStats(indexShard.routingEntry(), indexShard.shardPath(), new CommonStats(indexShard, flags), indexShard.commitStats(), indexShard.seqNoStats()); ======= return new ShardStats(indexShard.routingEntry(), indexShard.shardPath(), new CommonStats(indicesService.getIndicesQueryCache(), indexShard, flags), indexShard.commitStats()); >>>>>>> return new ShardStats(indexShard.routingEntry(), indexShard.shardPath(), new CommonStats(indicesService.getIndicesQueryCache(), indexShard, flags), indexShard.commitStats(), indexShard.seqNoStats());
<<<<<<< ======= import org.apache.lucene.search.Query; import org.apache.lucene.search.spans.SpanNearQuery; import org.apache.lucene.search.spans.SpanQuery; import org.elasticsearch.common.ParsingException; >>>>>>> import org.elasticsearch.common.ParsingException; <<<<<<< public SpanNearQueryBuilder fromXContent(QueryParseContext parseContext) throws IOException, QueryParsingException { ======= public Query parse(QueryParseContext parseContext) throws IOException, ParsingException { >>>>>>> public SpanNearQueryBuilder fromXContent(QueryParseContext parseContext) throws IOException { <<<<<<< QueryBuilder query = parseContext.parseInnerQueryBuilder(); if (!(query instanceof SpanQueryBuilder)) { throw new QueryParsingException(parseContext, "spanNear [clauses] must be of type span query"); ======= Query query = parseContext.parseInnerQuery(); if (!(query instanceof SpanQuery)) { throw new ParsingException(parseContext, "spanNear [clauses] must be of type span query"); >>>>>>> QueryBuilder query = parseContext.parseInnerQueryBuilder(); if (!(query instanceof SpanQueryBuilder)) { throw new ParsingException(parseContext, "spanNear [clauses] must be of type span query");
<<<<<<< modules.add(new ClusterModule(this.settings)); modules.add(new IndicesModule(namedWriteableRegistry)); ======= modules.add(new ClusterModule(this.settings, clusterService)); modules.add(new IndicesModule()); >>>>>>> modules.add(new ClusterModule(this.settings, clusterService)); modules.add(new IndicesModule(namedWriteableRegistry));
<<<<<<< indexShardRoutingBuilder.addShard(TestShardRouting.newShardRouting(index, 0, primaryNode, relocatingNode, null, primaryTerm, true, primaryState, 0, unassignedInfo)); ======= indexShardRoutingBuilder.addShard(TestShardRouting.newShardRouting(index, 0, primaryNode, relocatingNode, null, true, primaryState, unassignedInfo)); >>>>>>> indexShardRoutingBuilder.addShard(TestShardRouting.newShardRouting(index, 0, primaryNode, relocatingNode, null, primaryTerm, true, primaryState, unassignedInfo)); <<<<<<< TestShardRouting.newShardRouting(index, shardId.id(), replicaNode, relocatingNode, null, primaryTerm, false, replicaState, 0, unassignedInfo)); ======= TestShardRouting.newShardRouting(index, shardId.id(), replicaNode, relocatingNode, null, false, replicaState, unassignedInfo)); >>>>>>> TestShardRouting.newShardRouting(index, shardId.id(), replicaNode, relocatingNode, null, primaryTerm, false, replicaState, unassignedInfo)); <<<<<<< IndexRoutingTable.Builder indexRoutingTableBuilder = IndexRoutingTable.builder(index); final int primaryTerm = randomInt(200); ======= IndexRoutingTable.Builder indexRoutingTableBuilder = IndexRoutingTable.builder(indexMetaData.getIndex()); >>>>>>> IndexRoutingTable.Builder indexRoutingTableBuilder = IndexRoutingTable.builder(indexMetaData.getIndex()); final int primaryTerm = randomInt(200); <<<<<<< indexShardRoutingBuilder.addShard(TestShardRouting.newShardRouting(index, i, newNode(0).id(), null, null, primaryTerm, true, ShardRoutingState.STARTED, 0, null)); indexShardRoutingBuilder.addShard(TestShardRouting.newShardRouting(index, i, newNode(1).id(), null, null, primaryTerm, false, ShardRoutingState.STARTED, 0, null)); ======= indexShardRoutingBuilder.addShard(TestShardRouting.newShardRouting(index, i, newNode(0).id(), null, null, true, ShardRoutingState.STARTED, null)); indexShardRoutingBuilder.addShard(TestShardRouting.newShardRouting(index, i, newNode(1).id(), null, null, false, ShardRoutingState.STARTED, null)); >>>>>>> indexShardRoutingBuilder.addShard(TestShardRouting.newShardRouting(index, i, newNode(0).id(), null, null, primaryTerm, true, ShardRoutingState.STARTED, null)); indexShardRoutingBuilder.addShard(TestShardRouting.newShardRouting(index, i, newNode(1).id(), null, null, primaryTerm, false, ShardRoutingState.STARTED, null));
<<<<<<< if (sOpType != null) { try { indexRequest.opType(sOpType); } catch (IllegalArgumentException eia){ try { XContentBuilder builder = channel.newErrorBuilder(); channel.sendResponse( new BytesRestResponse(BAD_REQUEST, builder.startObject().field("error", eia.getMessage()).endObject())); } catch (IOException e1) { logger.warn("Failed to send response", e1); return; } } } ======= >>>>>>>
<<<<<<< final PingRequest pingRequest = new PingRequest(node.getId(), clusterName, localNode, clusterStateVersion); final TransportRequestOptions options = TransportRequestOptions.builder().withType(TransportRequestOptions.Type.PING).withTimeout(pingRetryTimeout).build(); transportService.sendRequest(node, PING_ACTION_NAME, pingRequest, options, new TransportResponseHandler<PingResponse>() { ======= final PingRequest pingRequest = new PingRequest(node, clusterName, localNode, clusterStateVersion); final TransportRequestOptions options = TransportRequestOptions.builder().withType(TransportRequestOptions.Type.PING) .withTimeout(pingRetryTimeout).build(); transportService.sendRequest(node, PING_ACTION_NAME, pingRequest, options, new BaseTransportResponseHandler<PingResponse>() { >>>>>>> final PingRequest pingRequest = new PingRequest(node, clusterName, localNode, clusterStateVersion); final TransportRequestOptions options = TransportRequestOptions.builder().withType(TransportRequestOptions.Type.PING) .withTimeout(pingRetryTimeout).build(); transportService.sendRequest(node, PING_ACTION_NAME, pingRequest, options, new TransportResponseHandler<PingResponse>() {
<<<<<<< import org.elasticsearch.index.query.QueryShardException; import org.elasticsearch.index.query.functionscore.factor.FactorBuilder; import org.elasticsearch.index.query.support.QueryInnerHits; ======= import org.elasticsearch.index.query.QueryParsingException; import org.elasticsearch.index.query.functionscore.weight.WeightBuilder; import org.elasticsearch.index.query.support.QueryInnerHitBuilder; >>>>>>> import org.elasticsearch.index.query.QueryShardException; import org.elasticsearch.index.query.support.QueryInnerHits; import org.elasticsearch.index.query.QueryParsingException; import org.elasticsearch.index.query.functionscore.weight.WeightBuilder;
<<<<<<< ======= import org.apache.lucene.search.Query; import org.apache.lucene.search.spans.SpanNotQuery; import org.apache.lucene.search.spans.SpanQuery; import org.elasticsearch.common.ParsingException; >>>>>>> import org.elasticsearch.common.ParsingException; <<<<<<< public SpanNotQueryBuilder fromXContent(QueryParseContext parseContext) throws IOException, QueryParsingException { ======= public Query parse(QueryParseContext parseContext) throws IOException, ParsingException { >>>>>>> public SpanNotQueryBuilder fromXContent(QueryParseContext parseContext) throws IOException { <<<<<<< QueryBuilder query = parseContext.parseInnerQueryBuilder(); if (!(query instanceof SpanQueryBuilder)) { throw new QueryParsingException(parseContext, "spanNot [include] must be of type span query"); ======= Query query = parseContext.parseInnerQuery(); if (!(query instanceof SpanQuery)) { throw new ParsingException(parseContext, "spanNot [include] must be of type span query"); >>>>>>> QueryBuilder query = parseContext.parseInnerQueryBuilder(); if (!(query instanceof SpanQueryBuilder)) { throw new ParsingException(parseContext, "spanNot [include] must be of type span query"); <<<<<<< QueryBuilder query = parseContext.parseInnerQueryBuilder(); if (!(query instanceof SpanQueryBuilder)) { throw new QueryParsingException(parseContext, "spanNot [exclude] must be of type span query"); ======= Query query = parseContext.parseInnerQuery(); if (!(query instanceof SpanQuery)) { throw new ParsingException(parseContext, "spanNot [exclude] must be of type span query"); >>>>>>> QueryBuilder query = parseContext.parseInnerQueryBuilder(); if (!(query instanceof SpanQueryBuilder)) { throw new ParsingException(parseContext, "spanNot [exclude] must be of type span query");
<<<<<<< final DeleteResult deleteResult = new DeleteResult(e, currentVersion, unassignedSeqNo, currentlyDeleted == false); return new DeletionStrategy(false, false, currentlyDeleted, unassignedSeqNo, Versions.NOT_FOUND, deleteResult); ======= final DeleteResult deleteResult = new DeleteResult(e, currentVersion, term, unassignedSeqNo, currentlyDeleted == false); return new DeletionStrategy(false, currentlyDeleted, unassignedSeqNo, Versions.NOT_FOUND, deleteResult); >>>>>>> final DeleteResult deleteResult = new DeleteResult(e, currentVersion, term, unassignedSeqNo, currentlyDeleted == false); return new DeletionStrategy(false, false, currentlyDeleted, unassignedSeqNo, Versions.NOT_FOUND, deleteResult); <<<<<<< Exception failure = null; if (softDeleteEnabled) { try { final ParsedDocument tombstone = engineConfig.getTombstoneDocSupplier().newNoopTombstoneDoc(noOp.reason()); tombstone.updateSeqID(noOp.seqNo(), noOp.primaryTerm()); // A noop tombstone does not require a _version but it's added to have a fully dense docvalues for the version field. // 1L is selected to optimize the compression because it might probably be the most common value in version field. tombstone.version().setLongValue(1L); assert tombstone.docs().size() == 1 : "Tombstone should have a single doc [" + tombstone + "]"; final ParseContext.Document doc = tombstone.docs().get(0); assert doc.getField(SeqNoFieldMapper.TOMBSTONE_NAME) != null : "Noop tombstone document but _tombstone field is not set [" + doc + " ]"; doc.add(softDeleteField); indexWriter.addDocument(doc); } catch (Exception ex) { if (maybeFailEngine("noop", ex)) { throw ex; } failure = ex; } } final NoOpResult noOpResult = failure != null ? new NoOpResult(noOp.seqNo(), failure) : new NoOpResult(noOp.seqNo()); ======= final NoOpResult noOpResult = new NoOpResult(getPrimaryTerm(), noOp.seqNo()); >>>>>>> Exception failure = null; if (softDeleteEnabled) { try { final ParsedDocument tombstone = engineConfig.getTombstoneDocSupplier().newNoopTombstoneDoc(noOp.reason()); tombstone.updateSeqID(noOp.seqNo(), noOp.primaryTerm()); // A noop tombstone does not require a _version but it's added to have a fully dense docvalues for the version field. // 1L is selected to optimize the compression because it might probably be the most common value in version field. tombstone.version().setLongValue(1L); assert tombstone.docs().size() == 1 : "Tombstone should have a single doc [" + tombstone + "]"; final ParseContext.Document doc = tombstone.docs().get(0); assert doc.getField(SeqNoFieldMapper.TOMBSTONE_NAME) != null : "Noop tombstone document but _tombstone field is not set [" + doc + " ]"; doc.add(softDeleteField); indexWriter.addDocument(doc); } catch (Exception ex) { if (maybeFailEngine("noop", ex)) { throw ex; } failure = ex; } } final NoOpResult noOpResult = failure != null ? new NoOpResult(getPrimaryTerm(), noOp.seqNo(), failure) : new NoOpResult(getPrimaryTerm(), noOp.seqNo());
<<<<<<< import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.script.ScriptService.ScriptType; import org.elasticsearch.script.expression.ExpressionScriptEngineService; ======= >>>>>>> import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.script.ScriptService.ScriptType; <<<<<<< @Test public void testAllOpsDisabledIndexedScripts() throws IOException { if (randomBoolean()) { client().preparePutIndexedScript(ExpressionScriptEngineService.NAME, "script1", "{\"script\":\"2\"}").get(); } else { client().prepareIndex(ScriptService.SCRIPT_INDEX, ExpressionScriptEngineService.NAME, "script1").setSource("{\"script\":\"2\"}").get(); } client().prepareIndex("test", "scriptTest", "1").setSource("{\"theField\":\"foo\"}").get(); try { client().prepareUpdate("test", "scriptTest", "1") .setScript(new Script("script1", ScriptService.ScriptType.INDEXED, ExpressionScriptEngineService.NAME, null)).get(); fail("update script should have been rejected"); } catch(Exception e) { assertThat(e.getMessage(), containsString("failed to execute script")); assertThat(e.getCause().getMessage(), containsString("scripts of type [indexed], operation [update] and lang [expression] are disabled")); } try { client().prepareSearch() .setSource( new SearchSourceBuilder().scriptField("test1", new Script("script1", ScriptType.INDEXED, "expression", null))) .setIndices("test").setTypes("scriptTest").get(); fail("search script should have been rejected"); } catch (Exception e) { assertThat(e.toString(), containsString("scripts of type [indexed], operation [search] and lang [expression] are disabled")); } try { client().prepareSearch("test") .setSource( new SearchSourceBuilder().aggregation(AggregationBuilders.terms("test").script( new Script("script1", ScriptType.INDEXED, "expression", null)))).get(); } catch (Exception e) { assertThat(e.toString(), containsString("scripts of type [indexed], operation [aggs] and lang [expression] are disabled")); } } ======= >>>>>>>
<<<<<<< import org.elasticsearch.search.aggregations.InternalAggregationTestCase; import org.elasticsearch.search.aggregations.ParsedAggregation; ======= >>>>>>> import org.elasticsearch.search.aggregations.ParsedAggregation;
<<<<<<< private SearchResponse minMaxQuery(ScoreType scoreType, int minChildren, int maxChildren, int cutoff) throws SearchPhaseExecutionException { ======= private SearchResponse minMaxQuery(String scoreType, int minChildren, int maxChildren) throws SearchPhaseExecutionException { >>>>>>> private SearchResponse minMaxQuery(ScoreType scoreType, int minChildren, int maxChildren) throws SearchPhaseExecutionException { <<<<<<< .minChildren(minChildren).maxChildren(maxChildren).shortCircuitCutoff(cutoff)) ======= .minChildren(minChildren).maxChildren(maxChildren)) >>>>>>> .minChildren(minChildren).maxChildren(maxChildren)) <<<<<<< .minChildren(minChildren).maxChildren(maxChildren).shortCircuitCutoff(cutoff))) ======= .minChildren(minChildren).maxChildren(maxChildren))) >>>>>>> .minChildren(minChildren).maxChildren(maxChildren))) <<<<<<< response = minMaxQuery(ScoreType.SUM, 3, 0, cutoff); ======= response = minMaxQuery("sum", 3, 0); >>>>>>> response = minMaxQuery(ScoreType.SUM, 3, 0); <<<<<<< response = minMaxQuery(ScoreType.SUM, 2, 2, cutoff); ======= response = minMaxQuery("sum", 2, 2); >>>>>>> response = minMaxQuery(ScoreType.SUM, 2, 2); <<<<<<< response = minMaxQuery(ScoreType.SUM, 3, 2, cutoff); ======= response = minMaxQuery("sum", 3, 2); >>>>>>> response = minMaxQuery(ScoreType.SUM, 3, 2); <<<<<<< response = minMaxQuery(ScoreType.MAX, 3, 0, cutoff); ======= response = minMaxQuery("max", 3, 0); >>>>>>> response = minMaxQuery(ScoreType.MAX, 3, 0); <<<<<<< response = minMaxQuery(ScoreType.MAX, 2, 2, cutoff); ======= response = minMaxQuery("max", 2, 2); >>>>>>> response = minMaxQuery(ScoreType.MAX, 2, 2); <<<<<<< response = minMaxQuery(ScoreType.MAX, 3, 2, cutoff); ======= response = minMaxQuery("max", 3, 2); >>>>>>> response = minMaxQuery(ScoreType.MAX, 3, 2); <<<<<<< response = minMaxQuery(ScoreType.AVG, 3, 0, cutoff); ======= response = minMaxQuery("avg", 3, 0); >>>>>>> response = minMaxQuery(ScoreType.AVG, 3, 0); <<<<<<< response = minMaxQuery(ScoreType.AVG, 2, 2, cutoff); ======= response = minMaxQuery("avg", 2, 2); >>>>>>> response = minMaxQuery(ScoreType.AVG, 2, 2); <<<<<<< response = minMaxQuery(ScoreType.AVG, 3, 2, cutoff); ======= response = minMaxQuery("avg", 3, 2); >>>>>>> response = minMaxQuery(ScoreType.AVG, 3, 2); <<<<<<< hasChildQueryBuilder.shortCircuitCutoff(randomInt(10)); ======= >>>>>>>
<<<<<<< public String index() { return this.index; } /** * Return the index id * * @return id of the index */ public String getIndex() { return index(); } /** * creates a new {@link IndexRoutingTable} with all shard versions &amp; primary terms set to the highest found. * This allows incrementing {@link ShardRouting#version()} and {@link ShardRouting#primaryTerm()} where we work on * the individual shards without worrying about synchronization between {@link ShardRouting} instances. This method * takes care of it. * * @return new {@link IndexRoutingTable} */ public IndexRoutingTable normalizeVersionsAndPrimaryTerms() { IndexRoutingTable.Builder builder = new Builder(this.index); for (IntObjectCursor<IndexShardRoutingTable> cursor : shards) { builder.addIndexShard(cursor.value.normalizeVersionsAndPrimaryTerms()); } return builder.build(); ======= public Index getIndex() { return index; >>>>>>> public Index getIndex() { return index; } /** * creates a new {@link IndexRoutingTable} with all shard versions &amp; primary terms set to the highest found. * This allows synchronizes {@link ShardRouting#primaryTerm()} where we work on * the individual shards without worrying about synchronization between {@link ShardRouting} instances. This method * takes care of it. * * @return new {@link IndexRoutingTable} */ public IndexRoutingTable normalizePrimaryTerms() { IndexRoutingTable.Builder builder = new Builder(this.index); for (IntObjectCursor<IndexShardRoutingTable> cursor : shards) { builder.addIndexShard(cursor.value.normalizePrimaryTerms()); } return builder.build(); <<<<<<< final long primaryTerm = indexMetaData.primaryTerm(shardId); IndexShardRoutingTable.Builder indexShardRoutingBuilder = new IndexShardRoutingTable.Builder(new ShardId(indexMetaData.getIndex(), shardId)); ======= IndexShardRoutingTable.Builder indexShardRoutingBuilder = new IndexShardRoutingTable.Builder(new ShardId(index, shardId)); >>>>>>> final long primaryTerm = indexMetaData.primaryTerm(shardId); IndexShardRoutingTable.Builder indexShardRoutingBuilder = new IndexShardRoutingTable.Builder(new ShardId(index, shardId));
<<<<<<< ======= import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.lucene.search.Queries; import org.elasticsearch.common.regex.Regex; import org.elasticsearch.common.util.LocaleUtils; >>>>>>> import org.elasticsearch.common.inject.Inject; <<<<<<< ======= import org.elasticsearch.index.mapper.MappedFieldType; >>>>>>> <<<<<<< public class SimpleQueryStringParser extends BaseQueryParser { ======= public class SimpleQueryStringParser implements QueryParser { public static final String NAME = "simple_query_string"; @Inject public SimpleQueryStringParser() { } >>>>>>> public class SimpleQueryStringParser extends BaseQueryParser { public static final String NAME = "simple_query_string"; @Inject public SimpleQueryStringParser() { } <<<<<<< throw new QueryParsingException(parseContext, "[" + SimpleQueryStringBuilder.NAME + "] query does not support [" + currentFieldName + "]"); ======= throw new QueryParsingException(parseContext, "[" + NAME + "] query does not support [" + currentFieldName + "]"); >>>>>>> throw new QueryParsingException(parseContext, "[" + NAME + "] query does not support [" + currentFieldName + "]"); <<<<<<< analyzerName = parser.text(); } else if ("field".equals(currentFieldName)) { field = parser.text(); ======= analyzer = parseContext.analysisService().analyzer(parser.text()); if (analyzer == null) { throw new QueryParsingException(parseContext, "[" + NAME + "] analyzer [" + parser.text() + "] not found"); } >>>>>>> analyzerName = parser.text(); <<<<<<< // Support specifying only a field instead of a map if (field == null) { field = currentFieldName; } SimpleQueryStringBuilder qb = new SimpleQueryStringBuilder(queryBody); qb.boost(boost).fields(fieldsAndWeights).analyzer(analyzerName).queryName(queryName).minimumShouldMatch(minimumShouldMatch); qb.flags(flags).defaultOperator(defaultOperator).locale(locale).lowercaseExpandedTerms(lowercaseExpandedTerms); qb.lenient(lenient).analyzeWildcard(analyzeWildcard).boost(boost); ======= // Use standard analyzer by default if (analyzer == null) { analyzer = parseContext.mapperService().searchAnalyzer(); } if (fieldsAndWeights == null) { fieldsAndWeights = Collections.singletonMap(parseContext.defaultField(), 1.0F); } SimpleQueryParser sqp = new SimpleQueryParser(analyzer, fieldsAndWeights, flags, sqsSettings); if (defaultOperator != null) { sqp.setDefaultOperator(defaultOperator); } >>>>>>> SimpleQueryStringBuilder qb = new SimpleQueryStringBuilder(queryBody); qb.boost(boost).fields(fieldsAndWeights).analyzer(analyzerName).queryName(queryName).minimumShouldMatch(minimumShouldMatch); qb.flags(flags).defaultOperator(defaultOperator).locale(locale).lowercaseExpandedTerms(lowercaseExpandedTerms); qb.lenient(lenient).analyzeWildcard(analyzeWildcard).boost(boost);
<<<<<<< public final Task execute(Request request, TaskListener<Response> listener) { Task task = taskManager.register("transport", actionName, request); execute(task, request, new ActionListener<Response>() { @Override public void onResponse(Response response) { if (task != null) { taskManager.unregister(task); } listener.onResponse(task, response); } @Override public void onFailure(Throwable e) { if (task != null) { taskManager.unregister(task); } listener.onFailure(task, e); } }); return task; } private final void execute(Task task, Request request, ActionListener<Response> listener) { ======= /** * Use this method when the transport action should continue to run in the context of the current task */ public final void execute(Task task, Request request, ActionListener<Response> listener) { >>>>>>> public final Task execute(Request request, TaskListener<Response> listener) { Task task = taskManager.register("transport", actionName, request); execute(task, request, new ActionListener<Response>() { @Override public void onResponse(Response response) { if (task != null) { taskManager.unregister(task); } listener.onResponse(task, response); } @Override public void onFailure(Throwable e) { if (task != null) { taskManager.unregister(task); } listener.onFailure(task, e); } }); return task; } /** * Use this method when the transport action should continue to run in the context of the current task */ public final void execute(Task task, Request request, ActionListener<Response> listener) {
<<<<<<< @Override public void updateGlobalCheckpointOnReplica(long checkpoint) { // nocommit: think shadow replicas through } @Override public long getLocalCheckpoint() { // nocommit: think shadow replicas through return -1; } @Override public long getGlobalCheckpoint() { // nocommit: think shadow replicas through return -1; } ======= @Override public void addRefreshListener(Translog.Location location, Consumer<Boolean> listener) { throw new UnsupportedOperationException("Can't listen for a refresh on a shadow engine because it doesn't have a translog"); } >>>>>>> @Override public void updateGlobalCheckpointOnReplica(long checkpoint) { // nocommit: think shadow replicas through } @Override public long getLocalCheckpoint() { // nocommit: think shadow replicas through return -1; } @Override public long getGlobalCheckpoint() { // nocommit: think shadow replicas through return -1; } @Override public void addRefreshListener(Translog.Location location, Consumer<Boolean> listener) { throw new UnsupportedOperationException("Can't listen for a refresh on a shadow engine because it doesn't have a translog"); }
<<<<<<< import org.elasticsearch.xpack.scheduler.SchedulerEngine; import org.elasticsearch.xpack.watcher.support.clock.Clock; ======= import org.elasticsearch.common.util.concurrent.EsExecutors; import org.elasticsearch.common.util.concurrent.FutureUtils; import org.elasticsearch.xpack.support.clock.Clock; >>>>>>> import org.elasticsearch.xpack.scheduler.SchedulerEngine; import org.elasticsearch.xpack.support.clock.Clock;
<<<<<<< ======= import org.apache.lucene.index.LeafReaderContext; import org.apache.lucene.search.IndexSearcher; import org.apache.lucene.search.Query; import org.apache.lucene.search.RandomAccessWeight; import org.apache.lucene.search.Weight; import org.apache.lucene.util.Bits; import org.elasticsearch.common.ParsingException; >>>>>>> import org.elasticsearch.common.ParsingException; <<<<<<< public ScriptQueryBuilder fromXContent(QueryParseContext parseContext) throws IOException, QueryParsingException { ======= public Query parse(QueryParseContext parseContext) throws IOException, ParsingException { >>>>>>> public ScriptQueryBuilder fromXContent(QueryParseContext parseContext) throws IOException {
<<<<<<< location = executeBulkItemRequest(metaData, indexShard, request, preVersions, preVersionTypes, location, requestIndex); ======= BulkItemRequest item = request.items()[requestIndex]; location = handleItem(metaData, request, primary, preVersions, preVersionTypes, location, requestIndex, item); >>>>>>> location = executeBulkItemRequest(metaData, primary, request, preVersions, preVersionTypes, location, requestIndex);
<<<<<<< String.format(outMessage, afkData.player.getPersistentID())); ======= String.format(inMessage, afkData.player.username)); >>>>>>> String.format(inMessage, afkData.player.getPersistentID())); <<<<<<< String.format(inMessage, afkData.player.getPersistentID())); ======= String.format(outMessage, afkData.player.username)); >>>>>>> String.format(outMessage, afkData.player.getPersistentID()));
<<<<<<< FilteredCatalog.Filter securityCatalogFilter = XPackSettings.SECURITY_ENABLED.get(settings) ? new SecurityCatalogFilter(threadPool.getThreadContext(), licenseState) : null; /* Note that we need *client*, not *internalClient* because client preserves the * authenticated user while internalClient throws that user away and acts as the * x-pack user. */ components.addAll(sql.createComponents(client, clusterService, securityCatalogFilter)); ======= PersistentTasksExecutorRegistry registry = new PersistentTasksExecutorRegistry(settings, tasksExecutors); PersistentTasksClusterService persistentTasksClusterService = new PersistentTasksClusterService(settings, registry, clusterService); components.add(persistentTasksClusterService); components.add(persistentTasksService); components.add(registry); >>>>>>> FilteredCatalog.Filter securityCatalogFilter = XPackSettings.SECURITY_ENABLED.get(settings) ? new SecurityCatalogFilter(threadPool.getThreadContext(), licenseState) : null; /* Note that we need *client*, not *internalClient* because client preserves the * authenticated user while internalClient throws that user away and acts as the * x-pack user. */ components.addAll(sql.createComponents(client, clusterService, securityCatalogFilter)); PersistentTasksExecutorRegistry registry = new PersistentTasksExecutorRegistry(settings, tasksExecutors); PersistentTasksClusterService persistentTasksClusterService = new PersistentTasksClusterService(settings, registry, clusterService); components.add(persistentTasksClusterService); components.add(persistentTasksService); components.add(registry);
<<<<<<< import org.elasticsearch.search.aggregations.metrics.percentiles.ParsedPercentiles; ======= import org.elasticsearch.search.aggregations.metrics.percentiles.Percentile; >>>>>>> import org.elasticsearch.search.aggregations.metrics.percentiles.Percentile; import org.elasticsearch.search.aggregations.metrics.percentiles.ParsedPercentiles; <<<<<<< @Override protected Class<? extends ParsedPercentiles> implementationClass() { return ParsedHDRPercentiles.class; } ======= public void testIterator() { final double[] percents = randomPercents(); final double[] values = new double[frequently() ? randomIntBetween(1, 10) : 0]; for (int i = 0; i < values.length; ++i) { values[i] = randomDouble(); } InternalHDRPercentiles aggregation = createTestInstance("test", emptyList(), emptyMap(), false, randomNumericDocValueFormat(), percents, values); Iterator<Percentile> iterator = aggregation.iterator(); for (double percent : percents) { assertTrue(iterator.hasNext()); Percentile percentile = iterator.next(); assertEquals(percent, percentile.getPercent(), 0.0d); assertEquals(aggregation.percentile(percent), percentile.getValue(), 0.0d); } } >>>>>>> @Override protected Class<? extends ParsedPercentiles> implementationClass() { return ParsedHDRPercentiles.class; } public void testIterator() { final double[] percents = randomPercents(); final double[] values = new double[frequently() ? randomIntBetween(1, 10) : 0]; for (int i = 0; i < values.length; ++i) { values[i] = randomDouble(); } InternalHDRPercentiles aggregation = createTestInstance("test", emptyList(), emptyMap(), false, randomNumericDocValueFormat(), percents, values); Iterator<Percentile> iterator = aggregation.iterator(); for (double percent : percents) { assertTrue(iterator.hasNext()); Percentile percentile = iterator.next(); assertEquals(percent, percentile.getPercent(), 0.0d); assertEquals(aggregation.percentile(percent), percentile.getValue(), 0.0d); } }
<<<<<<< import org.elasticsearch.license.plugin.core.XPackLicenseState; ======= import org.elasticsearch.script.ScriptService; import org.elasticsearch.xpack.security.SecurityLicenseState; >>>>>>> import org.elasticsearch.license.plugin.core.XPackLicenseState; import org.elasticsearch.script.ScriptService;
<<<<<<< import org.apache.lucene.index.Term; import org.apache.lucene.search.BooleanQuery; import org.apache.lucene.search.similarities.Similarity; import org.elasticsearch.ElasticsearchIllegalArgumentException; ======= >>>>>>> import org.apache.lucene.index.Term; import org.apache.lucene.search.BooleanQuery; import org.apache.lucene.search.similarities.Similarity;
<<<<<<< ======= import org.elasticsearch.index.mapper.Mapper; >>>>>>> import org.elasticsearch.index.mapper.Mapper; <<<<<<< ======= QueryShardContext mockShardContext = new QueryShardContext(idxSettings, null, null, null, mockMapperService, null, null, null) { @Override public MappedFieldType fieldMapper(String name) { StringFieldMapper.Builder builder = new StringFieldMapper.Builder(name); return builder.build(new Mapper.BuilderContext(idxSettings.getSettings(), new ContentPath(1))).fieldType(); } }; mockShardContext.setMapUnmappedFieldAsString(true); >>>>>>> QueryShardContext mockShardContext = new QueryShardContext(idxSettings, null, null, null, mockMapperService, null, null, null) { @Override public MappedFieldType fieldMapper(String name) { StringFieldMapper.Builder builder = new StringFieldMapper.Builder(name); return builder.build(new Mapper.BuilderContext(idxSettings.getSettings(), new ContentPath(1))).fieldType(); } }; mockShardContext.setMapUnmappedFieldAsString(true);
<<<<<<< new GetAsyncResultRequest(response.getId()) .setWaitForCompletion(TimeValue.timeValueMillis(10))).get(); ======= new GetAsyncSearchAction.Request(response.getId()) .setWaitForCompletionTimeout(TimeValue.timeValueMillis(10))).get(); >>>>>>> new GetAsyncResultRequest(response.getId()) .setWaitForCompletionTimeout(TimeValue.timeValueMillis(10))).get();
<<<<<<< if (engineConfig.getIndexSettings().getIndexVersionCreated().before(Version.V_6_0_0_alpha1) && origin == Operation.Origin.LOCAL_TRANSLOG_RECOVERY) { // legacy support assert seqNo == SequenceNumbers.UNASSIGNED_SEQ_NO : "old op recovering but it already has a seq no.;" + " index version: " + engineConfig.getIndexSettings().getIndexVersionCreated() + ", seqNo: " + seqNo; } else if (origin == Operation.Origin.PRIMARY) { assertPrimaryIncomingSequenceNumber(origin, seqNo); } else if (engineConfig.getIndexSettings().getIndexVersionCreated().onOrAfter(Version.V_6_0_0_alpha1)) { ======= if (origin == Operation.Origin.PRIMARY) { assert assertOriginPrimarySequenceNumber(seqNo); } else { >>>>>>> if (origin == Operation.Origin.PRIMARY) { assertPrimaryIncomingSequenceNumber(origin, seqNo); } else {
<<<<<<< import org.elasticsearch.xpack.core.enrich.action.DeleteEnrichPolicyAction; import org.elasticsearch.xpack.core.enrich.action.ExecuteEnrichPolicyAction; import org.elasticsearch.xpack.core.enrich.action.GetEnrichPolicyAction; import org.elasticsearch.xpack.core.enrich.action.ListEnrichPolicyAction; import org.elasticsearch.xpack.core.enrich.action.PutEnrichPolicyAction; ======= import org.elasticsearch.transport.TransportRequest; import org.elasticsearch.xpack.core.security.authz.permission.ClusterPermission; >>>>>>> import org.elasticsearch.xpack.core.enrich.action.DeleteEnrichPolicyAction; import org.elasticsearch.xpack.core.enrich.action.ExecuteEnrichPolicyAction; import org.elasticsearch.xpack.core.enrich.action.GetEnrichPolicyAction; import org.elasticsearch.xpack.core.enrich.action.ListEnrichPolicyAction; import org.elasticsearch.xpack.core.enrich.action.PutEnrichPolicyAction; import org.elasticsearch.transport.TransportRequest; import org.elasticsearch.xpack.core.security.authz.permission.ClusterPermission;
<<<<<<< public void onModule(final ScriptModule module) { module.addScriptEngine(new ScriptEngineRegistry.ScriptEngineRegistration( PainlessScriptEngineService.class, PainlessScriptEngineService.NAME, true)); ======= @Override public String name() { return "lang-painless"; } @Override public String description() { return "Painless scripting language for Elasticsearch"; } @Override public ScriptEngineService getScriptEngineService(Settings settings) { return new PainlessScriptEngineService(settings); >>>>>>> @Override public ScriptEngineService getScriptEngineService(Settings settings) { return new PainlessScriptEngineService(settings);
<<<<<<< import org.elasticsearch.search.suggest.SuggestionBuilder; import org.elasticsearch.search.suggest.phrase.PhraseSuggestionBuilder.SmoothingModel; ======= import org.elasticsearch.tasks.Task; >>>>>>> import org.elasticsearch.search.suggest.SuggestionBuilder; import org.elasticsearch.search.suggest.phrase.PhraseSuggestionBuilder.SmoothingModel; import org.elasticsearch.tasks.Task; <<<<<<< * Reads a {@link SmoothingModel} from the current stream */ public SmoothingModel readPhraseSuggestionSmoothingModel() throws IOException { return readNamedWriteable(SmoothingModel.class); } /** ======= * Reads a {@link Task.Status} from the current stream. */ public Task.Status readTaskStatus() throws IOException { return readNamedWriteable(Task.Status.class); } /** >>>>>>> * Reads a {@link SmoothingModel} from the current stream */ public SmoothingModel readPhraseSuggestionSmoothingModel() throws IOException { return readNamedWriteable(SmoothingModel.class); } /** * Reads a {@link Task.Status} from the current stream. */ public Task.Status readTaskStatus() throws IOException { return readNamedWriteable(Task.Status.class); } /**
<<<<<<< cast = AnalyzerCaster.getLegalCast(location, before, after, true); ======= cast = AnalyzerCaster.getLegalCast(definition, location, before, after, true, false); >>>>>>> cast = AnalyzerCaster.getLegalCast(location, before, after, true, false);
<<<<<<< ======= import com.google.common.collect.ImmutableList; >>>>>>>
<<<<<<< public static final String NAME = "script"; @Deprecated private String scriptString; @Deprecated private Map<String, Object> params; @Deprecated private String lang; ======= >>>>>>> <<<<<<< * @deprecated Use {@link #ScriptQueryBuilder(Script)} instead. */ @Deprecated public ScriptQueryBuilder(String script) { this.scriptString = script; } /** * @deprecated Use {@link #ScriptQueryBuilder(Script)} instead. */ @Deprecated public ScriptQueryBuilder addParam(String name, Object value) { if (params == null) { params = new HashMap<>(); } params.put(name, value); return this; } /** * @deprecated Use {@link #ScriptQueryBuilder(Script)} instead. */ @Deprecated public ScriptQueryBuilder params(Map<String, Object> params) { if (this.params == null) { this.params = params; } else { this.params.putAll(params); } return this; } /** * Sets the script language. * * @deprecated Use {@link #ScriptQueryBuilder(Script)} instead. */ @Deprecated public ScriptQueryBuilder lang(String lang) { this.lang = lang; return this; } /** ======= >>>>>>> <<<<<<< builder.startObject(NAME); if (script != null) { builder.field(ScriptField.SCRIPT.getPreferredName(), script); } else { if (this.scriptString != null) { builder.field("script", scriptString); } if (this.params != null) { builder.field("params", this.params); } if (this.lang != null) { builder.field("lang", lang); } } ======= builder.startObject(ScriptQueryParser.NAME); builder.field(ScriptField.SCRIPT.getPreferredName(), script); >>>>>>> public static final String NAME = "script"; static final ScriptQueryBuilder PROTOTYPE = new ScriptQueryBuilder((Script) null); private Script script; private String queryName; public ScriptQueryBuilder(Script script) { this.script = script; } /** * Sets the filter name for the filter that can be used when searching for matched_filters per hit. */ public ScriptQueryBuilder queryName(String queryName) { this.queryName = queryName; return this; } @Override protected void doXContent(XContentBuilder builder, Params builderParams) throws IOException { builder.startObject(NAME); builder.field(ScriptField.SCRIPT.getPreferredName(), script);
<<<<<<< import static org.elasticsearch.common.network.NetworkService.registerCustomNameResolvers; ======= import java.io.Closeable; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; >>>>>>> import java.io.Closeable; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; import static org.elasticsearch.common.network.NetworkService.registerCustomNameResolvers;
<<<<<<< final IndexSettings idxSettings = new IndexSettings(indexMetaData, this.settings, indexScopeSetting); final IndexModule indexModule = new IndexModule(idxSettings, analysisRegistry, getEngineFactory(idxSettings)); ======= final IndexSettings idxSettings = new IndexSettings(indexMetaData, this.settings, indexScopedSettings); final IndexModule indexModule = new IndexModule(idxSettings, analysisRegistry); >>>>>>> final IndexSettings idxSettings = new IndexSettings(indexMetaData, this.settings, indexScopedSettings); final IndexModule indexModule = new IndexModule(idxSettings, analysisRegistry, getEngineFactory(idxSettings));
<<<<<<< public class TermsQueryBuilder extends AbstractQueryBuilder<TermsQueryBuilder> { public static final String NAME = "terms"; ======= public class TermsQueryBuilder extends QueryBuilder implements BoostableQueryBuilder<TermsQueryBuilder> { >>>>>>> public class TermsQueryBuilder extends AbstractQueryBuilder<TermsQueryBuilder> implements BoostableQueryBuilder<TermsQueryBuilder> { public static final String NAME = "terms"; static final TermsQueryBuilder PROTOTYPE = new TermsQueryBuilder(null, (Object) null); <<<<<<< private String lookupIndex; private String lookupType; private String lookupId; private String lookupRouting; private String lookupPath; private Boolean lookupCache; static final TermsQueryBuilder PROTOTYPE = new TermsQueryBuilder(null, (Object) null); ======= private float boost = -1; >>>>>>> private String lookupIndex; private String lookupType; private String lookupId; private String lookupRouting; private String lookupPath; private Boolean lookupCache; private float boost = -1; <<<<<<< ======= if (boost != -1) { builder.field("boost", boost); } >>>>>>> if (boost != -1) { builder.field("boost", boost); }
<<<<<<< ======= import org.apache.lucene.search.Query; import org.elasticsearch.common.ParsingException; >>>>>>> import org.elasticsearch.common.ParsingException; <<<<<<< public SimpleQueryStringBuilder fromXContent(QueryParseContext parseContext) throws IOException, QueryParsingException { ======= public Query parse(QueryParseContext parseContext) throws IOException, ParsingException { >>>>>>> public SimpleQueryStringBuilder fromXContent(QueryParseContext parseContext) throws IOException { <<<<<<< throw new QueryParsingException(parseContext, "[" + SimpleQueryStringBuilder.NAME + "] query does not support [" + currentFieldName + "]"); ======= throw new ParsingException(parseContext, "[" + NAME + "] query does not support [" + currentFieldName + "]"); >>>>>>> throw new ParsingException(parseContext, "[" + SimpleQueryStringBuilder.NAME + "] query does not support [" + currentFieldName + "]"); <<<<<<< analyzerName = parser.text(); ======= analyzer = parseContext.analysisService().analyzer(parser.text()); if (analyzer == null) { throw new ParsingException(parseContext, "[" + NAME + "] analyzer [" + parser.text() + "] not found"); } >>>>>>> analyzerName = parser.text(); <<<<<<< defaultOperator = Operator.fromString(parser.text()); ======= String op = parser.text(); if ("or".equalsIgnoreCase(op)) { defaultOperator = BooleanClause.Occur.SHOULD; } else if ("and".equalsIgnoreCase(op)) { defaultOperator = BooleanClause.Occur.MUST; } else { throw new ParsingException(parseContext, "[" + NAME + "] default operator [" + op + "] is not allowed"); } >>>>>>> defaultOperator = Operator.fromString(parser.text()); <<<<<<< throw new QueryParsingException(parseContext, "[" + SimpleQueryStringBuilder.NAME + "] unsupported field [" + parser.currentName() + "]"); ======= throw new ParsingException(parseContext, "[" + NAME + "] unsupported field [" + parser.currentName() + "]"); >>>>>>> throw new ParsingException(parseContext, "[" + SimpleQueryStringBuilder.NAME + "] unsupported field [" + parser.currentName() + "]"); <<<<<<< throw new QueryParsingException(parseContext, "[" + SimpleQueryStringBuilder.NAME + "] query text missing"); ======= throw new ParsingException(parseContext, "[" + NAME + "] query text missing"); >>>>>>> throw new ParsingException(parseContext, "[" + SimpleQueryStringBuilder.NAME + "] query text missing");
<<<<<<< public FinalizeResponse finalizeRecovery() { return transportService.submitRequest(targetNode, RecoveryTargetService.Actions.FINALIZE, ======= public void finalizeRecovery() { transportService.submitRequest(targetNode, PeerRecoveryTargetService.Actions.FINALIZE, >>>>>>> public FinalizeResponse finalizeRecovery() { return transportService.submitRequest(targetNode, PeerRecoveryTargetService.Actions.FINALIZE,
<<<<<<< public QueryBuilder fromXContent(QueryParseContext parseContext) throws IOException, QueryParsingException { ======= public Query parse(QueryParseContext parseContext) throws IOException, ParsingException { >>>>>>> public QueryBuilder fromXContent(QueryParseContext parseContext) throws IOException { <<<<<<< throw new QueryParsingException(parseContext, "no value specified for fuzzy query"); ======= throw new ParsingException(parseContext, "No value specified for fuzzy query"); } Query query = null; MappedFieldType fieldType = parseContext.fieldMapper(fieldName); if (fieldType != null) { query = fieldType.fuzzyQuery(value, fuzziness, prefixLength, maxExpansions, transpositions); } if (query == null) { int maxEdits = fuzziness.asDistance(BytesRefs.toString(value)); query = new FuzzyQuery(new Term(fieldName, BytesRefs.toBytesRef(value)), maxEdits, prefixLength, maxExpansions, transpositions); >>>>>>> throw new ParsingException(parseContext, "no value specified for fuzzy query");
<<<<<<< import org.elasticsearch.common.settings.Setting.SettingsProperty; import org.elasticsearch.common.settings.Settings; ======= >>>>>>> import org.elasticsearch.common.settings.Setting.SettingsProperty; import org.elasticsearch.common.settings.Settings; <<<<<<< public static final Setting<LogLevel> LOG_DEFAULT_LEVEL_SETTING = new Setting<>("logger.level", LogLevel.INFO.name(), LogLevel::parse, SettingsProperty.ClusterScope); public static final Setting<LogLevel> LOG_LEVEL_SETTING = Setting.dynamicKeySetting("logger.", LogLevel.INFO.name(), LogLevel::parse, SettingsProperty.Dynamic, SettingsProperty.ClusterScope); private static volatile ESLoggerFactory defaultFactory = new JdkESLoggerFactory(); static { try { Class<?> loggerClazz = Class.forName("org.apache.log4j.Logger"); // below will throw a NoSuchMethod failure with using slf4j log4j bridge loggerClazz.getMethod("setLevel", Class.forName("org.apache.log4j.Level")); defaultFactory = new Log4jESLoggerFactory(); } catch (Throwable e) { // no log4j try { Class.forName("org.slf4j.Logger"); defaultFactory = new Slf4jESLoggerFactory(); } catch (Throwable e1) { // no slf4j } } } /** * Changes the default factory. */ public static void setDefaultFactory(ESLoggerFactory defaultFactory) { if (defaultFactory == null) { throw new NullPointerException("defaultFactory"); } ESLoggerFactory.defaultFactory = defaultFactory; } ======= public static final Setting<LogLevel> LOG_DEFAULT_LEVEL_SETTING = new Setting<>("logger.level", LogLevel.INFO.name(), LogLevel::parse, false, Setting.Scope.CLUSTER); public static final Setting<LogLevel> LOG_LEVEL_SETTING = Setting.dynamicKeySetting("logger.", LogLevel.INFO.name(), LogLevel::parse, true, Setting.Scope.CLUSTER); >>>>>>> public static final Setting<LogLevel> LOG_DEFAULT_LEVEL_SETTING = new Setting<>("logger.level", LogLevel.INFO.name(), LogLevel::parse, SettingsProperty.ClusterScope); public static final Setting<LogLevel> LOG_LEVEL_SETTING = Setting.dynamicKeySetting("logger.", LogLevel.INFO.name(), LogLevel::parse, SettingsProperty.Dynamic, SettingsProperty.ClusterScope);
<<<<<<< @Override public HasChildQueryBuilder getBuilderPrototype() { return HasChildQueryBuilder.PROTOTYPE; } ======= public static Query joinUtilHelper(String parentType, ParentChildIndexFieldData parentChildIndexFieldData, Query toQuery, ScoreType scoreType, Query innerQuery, int minChildren, int maxChildren) throws IOException { SearchContext searchContext = SearchContext.current(); if (searchContext == null) { throw new IllegalStateException("Search context is required to be set"); } String joinField = ParentFieldMapper.joinField(parentType); ScoreMode scoreMode; // TODO: move entirely over from ScoreType to org.apache.lucene.join.ScoreMode, when we drop the 1.x parent child code. switch (scoreType) { case NONE: scoreMode = ScoreMode.None; break; case MIN: scoreMode = ScoreMode.Min; break; case MAX: scoreMode = ScoreMode.Max; break; case SUM: scoreMode = ScoreMode.Total; break; case AVG: scoreMode = ScoreMode.Avg; break; default: throw new UnsupportedOperationException("score type [" + scoreType + "] not supported"); } IndexReader indexReader = searchContext.searcher().getIndexReader(); IndexSearcher indexSearcher = new IndexSearcher(indexReader); IndexParentChildFieldData indexParentChildFieldData = parentChildIndexFieldData.loadGlobal(indexReader); MultiDocValues.OrdinalMap ordinalMap = ParentChildIndexFieldData.getOrdinalMap(indexParentChildFieldData, parentType); // 0 in pre 2.x p/c impl means unbounded if (maxChildren == 0) { maxChildren = Integer.MAX_VALUE; } return JoinUtil.createJoinQuery(joinField, innerQuery, toQuery, indexSearcher, scoreMode, ordinalMap, minChildren, maxChildren); } >>>>>>> public static Query joinUtilHelper(String parentType, ParentChildIndexFieldData parentChildIndexFieldData, Query toQuery, ScoreType scoreType, Query innerQuery, int minChildren, int maxChildren) throws IOException { SearchContext searchContext = SearchContext.current(); if (searchContext == null) { throw new IllegalStateException("Search context is required to be set"); } String joinField = ParentFieldMapper.joinField(parentType); ScoreMode scoreMode; // TODO: move entirely over from ScoreType to org.apache.lucene.join.ScoreMode, when we drop the 1.x parent child code. switch (scoreType) { case NONE: scoreMode = ScoreMode.None; break; case MIN: scoreMode = ScoreMode.Min; break; case MAX: scoreMode = ScoreMode.Max; break; case SUM: scoreMode = ScoreMode.Total; break; case AVG: scoreMode = ScoreMode.Avg; break; default: throw new UnsupportedOperationException("score type [" + scoreType + "] not supported"); } IndexReader indexReader = searchContext.searcher().getIndexReader(); IndexSearcher indexSearcher = new IndexSearcher(indexReader); IndexParentChildFieldData indexParentChildFieldData = parentChildIndexFieldData.loadGlobal(indexReader); MultiDocValues.OrdinalMap ordinalMap = ParentChildIndexFieldData.getOrdinalMap(indexParentChildFieldData, parentType); // 0 in pre 2.x p/c impl means unbounded if (maxChildren == 0) { maxChildren = Integer.MAX_VALUE; } return JoinUtil.createJoinQuery(joinField, innerQuery, toQuery, indexSearcher, scoreMode, ordinalMap, minChildren, maxChildren); } @Override public HasChildQueryBuilder getBuilderPrototype() { return HasChildQueryBuilder.PROTOTYPE; }
<<<<<<< public boolean canConsoleUseCommand() { return true; } @Override public List<String> addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) ======= public List<String> addTabCompletionOptions(ICommandSender sender, String[] args) >>>>>>> public List<String> addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos)
<<<<<<< import org.elasticsearch.search.aggregations.bucket.InternalSingleBucketAggregationTestCase; import org.elasticsearch.search.aggregations.bucket.ParsedSingleBucketAggregation; ======= import org.elasticsearch.search.aggregations.InternalSingleBucketAggregationTestCase; >>>>>>> import org.elasticsearch.search.aggregations.InternalSingleBucketAggregationTestCase; import org.elasticsearch.search.aggregations.bucket.ParsedSingleBucketAggregation;
<<<<<<< import org.apache.lucene.search.*; ======= import org.apache.lucene.search.Filter; import org.apache.lucene.search.IndexSearcher; import org.apache.lucene.search.Query; import org.apache.lucene.search.QueryWrapperFilter; >>>>>>> import org.apache.lucene.search.Filter; import org.apache.lucene.search.IndexSearcher; import org.apache.lucene.search.Query; import org.apache.lucene.search.QueryWrapperFilter; <<<<<<< ParsedQuery parsedQuery = new ParsedQuery(innerQuery, context.copyNamedQueries()); InnerHitsContext.ParentChildInnerHits parentChildInnerHits = new InnerHitsContext.ParentChildInnerHits(innerHits.v2(), parsedQuery, null, context.mapperService(), childDocMapper); String name = innerHits.v1() != null ? innerHits.v1() : childType; context.addInnerHits(name, parentChildInnerHits); ======= ParsedQuery parsedQuery = new ParsedQuery(innerQuery, parseContext.copyNamedQueries()); InnerHitsContext.ParentChildInnerHits parentChildInnerHits = new InnerHitsContext.ParentChildInnerHits(innerHits.getSubSearchContext(), parsedQuery, null, parseContext.mapperService(), childDocMapper); String name = innerHits.getName() != null ? innerHits.getName() : childType; parseContext.addInnerHits(name, parentChildInnerHits); >>>>>>> ParsedQuery parsedQuery = new ParsedQuery(innerQuery, context.copyNamedQueries()); InnerHitsContext.ParentChildInnerHits parentChildInnerHits = new InnerHitsContext.ParentChildInnerHits(innerHits.getSubSearchContext(), parsedQuery, null, context.mapperService(), childDocMapper); String name = innerHits.getName() != null ? innerHits.getName() : childType; context.addInnerHits(name, parentChildInnerHits);
<<<<<<< import org.elasticsearch.discovery.DiscoveryModule; ======= >>>>>>> <<<<<<< import org.elasticsearch.transport.MockTcpTransportPlugin; ======= import org.elasticsearch.transport.AssertingTransportInterceptor; import org.elasticsearch.transport.MockTcpTransportPlugin; >>>>>>> import org.elasticsearch.transport.AssertingTransportInterceptor; import org.elasticsearch.transport.MockTcpTransportPlugin; <<<<<<< protected void beforeIndexDeletion() throws Exception { ======= protected void beforeIndexDeletion() throws IOException { >>>>>>> protected void beforeIndexDeletion() throws Exception {
<<<<<<< import org.elasticsearch.search.DocValueFormat; import org.elasticsearch.search.aggregations.InternalAggregationTestCase; import org.elasticsearch.search.aggregations.ParsedAggregation; ======= >>>>>>> import org.elasticsearch.search.DocValueFormat; import org.elasticsearch.search.aggregations.ParsedAggregation;
<<<<<<< import net.minecraftforge.fml.common.network.simpleimpl.IMessage; ======= >>>>>>> import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
<<<<<<< loadInventoryFromNBT(owner.getEntityData().getCompoundTag(EntityPlayer.PERSISTED_NBT_TAG).getTagList("VirtualChestItems", 9)); super.openInventory(player); ======= loadInventoryFromNBT(owner.getEntityData().getCompoundTag(EntityPlayer.PERSISTED_NBT_TAG).getTagList(VIRTUALCHEST_TAG, 10)); super.openInventory(); >>>>>>> loadInventoryFromNBT(owner.getEntityData().getCompoundTag(EntityPlayer.PERSISTED_NBT_TAG).getTagList(VIRTUALCHEST_TAG, 10)); super.openInventory(player); <<<<<<< super.closeInventory(player); ======= temp.setTag(VIRTUALCHEST_TAG, saveInventoryToNBT()); super.closeInventory(); >>>>>>> temp.setTag(VIRTUALCHEST_TAG, saveInventoryToNBT()); super.closeInventory(player); <<<<<<< NBTTagCompound var3 = par1NBTTagList.getCompoundTagAt(var2); int var4 = var3.getByte("Slot") & 255; ======= NBTTagCompound tagSlot = tag.getCompoundTagAt(tagIndex); int var4 = tagSlot.getByte("Slot") & 255; >>>>>>> NBTTagCompound tagSlot = tag.getCompoundTagAt(tagIndex); int var4 = tagSlot.getByte("Slot") & 255;
<<<<<<< new IndexShardRoutingTable.Builder(new ShardId("test", i)) .addShard(TestShardRouting.newShardRouting("test", i, masterId, 1, true, ShardRoutingState.STARTED, shardVersions[shardIds[i]])) ======= new IndexShardRoutingTable.Builder(new ShardId(index, i)) .addShard(TestShardRouting.newShardRouting("test", i, masterId, true, ShardRoutingState.STARTED)) >>>>>>> new IndexShardRoutingTable.Builder(new ShardId(index, i)) .addShard(TestShardRouting.newShardRouting("test", i, masterId, 1, true, ShardRoutingState.STARTED))
<<<<<<< String relocatingNodeId, RestoreSource restoreSource, long primaryTerm, boolean primary, ShardRoutingState state, long version, UnassignedInfo unassignedInfo) { return new ShardRouting(index, shardId, currentNodeId, relocatingNodeId, restoreSource, primaryTerm, primary, state, version, unassignedInfo, buildAllocationId(state), true, -1); ======= String relocatingNodeId, RestoreSource restoreSource, boolean primary, ShardRoutingState state, UnassignedInfo unassignedInfo) { return newShardRouting(new Index(index, IndexMetaData.INDEX_UUID_NA_VALUE), shardId, currentNodeId, relocatingNodeId, restoreSource, primary, state, unassignedInfo); } public static ShardRouting newShardRouting(Index index, int shardId, String currentNodeId, String relocatingNodeId, RestoreSource restoreSource, boolean primary, ShardRoutingState state, UnassignedInfo unassignedInfo) { return new ShardRouting(index, shardId, currentNodeId, relocatingNodeId, restoreSource, primary, state, unassignedInfo, buildAllocationId(state), true, -1); } public static void relocate(ShardRouting shardRouting, String relocatingNodeId, long expectedShardSize) { shardRouting.relocate(relocatingNodeId, expectedShardSize); >>>>>>> String relocatingNodeId, RestoreSource restoreSource, long primaryTerm, boolean primary, ShardRoutingState state, UnassignedInfo unassignedInfo) { return newShardRouting(new Index(index, IndexMetaData.INDEX_UUID_NA_VALUE), shardId, currentNodeId, relocatingNodeId, restoreSource, primaryTerm, primary, state, unassignedInfo); } public static ShardRouting newShardRouting(Index index, int shardId, String currentNodeId, String relocatingNodeId, RestoreSource restoreSource, long primaryTerm, boolean primary, ShardRoutingState state, UnassignedInfo unassignedInfo) { return new ShardRouting(index, shardId, currentNodeId, relocatingNodeId, restoreSource, primaryTerm, primary, state, unassignedInfo, buildAllocationId(state), true, -1); } public static void relocate(ShardRouting shardRouting, String relocatingNodeId, long expectedShardSize) { shardRouting.relocate(relocatingNodeId, expectedShardSize);