id stringlengths 7 14 | text stringlengths 1 106k |
|---|---|
223551095_1796 | @Override
public Result finalizeResult(Result queryResult) {
TreeNode<Resource> resultTree = queryResult.getResultTree();
Result result = new ResultImpl(true);
TreeNode<Resource> blueprintResultTree = result.getResultTree();
if (isCollection(resultTree)) {
blueprintResultTree.setProperty("isCollection", "tr... |
223551095_1797 | @Override
public Result finalizeResult(Result queryResult) {
TreeNode<Resource> resultTree = queryResult.getResultTree();
Result result = new ResultImpl(true);
TreeNode<Resource> blueprintResultTree = result.getResultTree();
if (isCollection(resultTree)) {
blueprintResultTree.setProperty("isCollection", "tr... |
223551095_1798 | @Override
public Result finalizeResult(Result queryResult) {
TreeNode<Resource> resultTree = queryResult.getResultTree();
Result result = new ResultImpl(true);
TreeNode<Resource> blueprintResultTree = result.getResultTree();
if (isCollection(resultTree)) {
blueprintResultTree.setProperty("isCollection", "tr... |
223551095_1800 | public Predicate getExtendedPredicate() {
return lastVisited;
} |
223551095_1801 | @Override
public boolean isCollectionResource() {
return getKeyValueMap().get(getResourceDefinition().getType()) == null;
} |
223551095_1802 | @Override
public boolean isCollectionResource() {
return getKeyValueMap().get(getResourceDefinition().getType()) == null;
} |
223551095_1803 | @Override
public Result execute()
throws UnsupportedPropertyException,
SystemException,
NoSuchResourceException,
NoSuchParentResourceException {
queryForResources();
return getResult(null);
} |
223551095_1804 | @Override
public Result execute()
throws UnsupportedPropertyException,
SystemException,
NoSuchResourceException,
NoSuchParentResourceException {
queryForResources();
return getResult(null);
} |
223551095_1805 | protected Map<Resource, Set<Map<String, Object>>> getJoinedResourceProperties(Set<String> propertyIds,
Resource parentResource,
String category)
throws SystemEx... |
223551095_1806 | @Override
public Result execute()
throws UnsupportedPropertyException,
SystemException,
NoSuchResourceException,
NoSuchParentResourceException {
queryForResources();
return getResult(null);
} |
223551095_1807 | @Override
public Result execute()
throws UnsupportedPropertyException,
SystemException,
NoSuchResourceException,
NoSuchParentResourceException {
queryForResources();
return getResult(null);
} |
223551095_1809 | @Override
public Result handleRequest(Request request) {
Query query = request.getResource().getQuery();
query.setPageRequest(request.getPageRequest());
query.setSortRequest(request.getSortRequest());
query.setRenderer(request.getRenderer());
// If the request body exists, copy the requstInfoProperties from i... |
223551095_1810 | @Override
public Result handleRequest(Request request) {
Query query = request.getResource().getQuery();
query.setPageRequest(request.getPageRequest());
query.setSortRequest(request.getSortRequest());
query.setRenderer(request.getRenderer());
// If the request body exists, copy the requstInfoProperties from i... |
223551095_1811 | @Override
public Result handleRequest(Request request) {
Query query = request.getResource().getQuery();
query.setPageRequest(request.getPageRequest());
query.setSortRequest(request.getSortRequest());
query.setRenderer(request.getRenderer());
// If the request body exists, copy the requstInfoProperties from i... |
223551095_1812 | @Override
public Result handleRequest(Request request) {
Query query = request.getResource().getQuery();
query.setPageRequest(request.getPageRequest());
query.setSortRequest(request.getSortRequest());
query.setRenderer(request.getRenderer());
// If the request body exists, copy the requstInfoProperties from i... |
223551095_1813 | @Override
public Result handleRequest(Request request) {
Query query = request.getResource().getQuery();
query.setPageRequest(request.getPageRequest());
query.setSortRequest(request.getSortRequest());
query.setRenderer(request.getRenderer());
// If the request body exists, copy the requstInfoProperties from i... |
223551095_1814 | @Override
public Result handleRequest(Request request) {
Query query = request.getResource().getQuery();
query.setPageRequest(request.getPageRequest());
query.setSortRequest(request.getSortRequest());
query.setRenderer(request.getRenderer());
// If the request body exists, copy the requstInfoProperties from i... |
223551095_1815 | @Override
public Result handleRequest(Request request) {
Query query = request.getResource().getQuery();
query.setPageRequest(request.getPageRequest());
query.setSortRequest(request.getSortRequest());
query.setRenderer(request.getRenderer());
// If the request body exists, copy the requstInfoProperties from i... |
223551095_1816 | @Override
public Result handleRequest(Request request) {
Query query = request.getResource().getQuery();
query.setPageRequest(request.getPageRequest());
query.setSortRequest(request.getSortRequest());
query.setRenderer(request.getRenderer());
// If the request body exists, copy the requstInfoProperties from i... |
223551095_1817 | @Override
public Result handleRequest(Request request) {
Result queryResult = getReadHandler().handleRequest(request);
if (queryResult.getStatus().isErrorState() ||
queryResult.getResultTree().getChildren().isEmpty()) {
// if query result has error state or contains no resources just return it.
// cur... |
223551095_1818 | @Override
public Result handleRequest(Request request) {
Result queryResult = getReadHandler().handleRequest(request);
if (queryResult.getStatus().isErrorState() ||
queryResult.getResultTree().getChildren().isEmpty()) {
// if query result has error state or contains no resources just return it.
// cur... |
223551095_1819 | @Override
public Result handleRequest(Request request) {
Result queryResult = getReadHandler().handleRequest(request);
if (queryResult.getStatus().isErrorState() ||
queryResult.getResultTree().getChildren().isEmpty()) {
// if query result has error state or contains no resources just return it.
// cur... |
223551095_1820 | @Override
public Result handleRequest(Request request) {
Result queryResult = getReadHandler().handleRequest(request);
if (queryResult.getStatus().isErrorState() ||
queryResult.getResultTree().getChildren().isEmpty()) {
// if query result has error state or contains no resources just return it.
// cur... |
223551095_1821 | @Override
public Result handleRequest(Request request) {
Result queryResult = getReadHandler().handleRequest(request);
if (queryResult.getStatus().isErrorState() ||
queryResult.getResultTree().getChildren().isEmpty()) {
// if query result has error state or contains no resources just return it.
// cur... |
223551095_1822 | @Override
public Result handleRequest(Request request) {
Result queryResult = getReadHandler().handleRequest(request);
if (queryResult.getStatus().isErrorState() ||
queryResult.getResultTree().getChildren().isEmpty()) {
// if query result has error state or contains no resources just return it.
// cur... |
223551095_1827 | @Override
public Predicate toPredicate(String prop, String val) {
return new LessEqualsPredicate<>(prop, val);
} |
223551095_1830 | @Override
public Predicate toPredicate(String prop, String val) {
return new GreaterPredicate<>(prop, val);
} |
223551095_1836 | @Override
public Predicate toPredicate(String prop, String val) {
return new GreaterEqualsPredicate<>(prop, val);
} |
223551095_1839 | @Override
public Predicate toPredicate(Predicate left, Predicate right) {
//todo: refactor to not need down casts
return new AndPredicate(left, right);
} |
223551095_1843 | @Override
public Predicate toPredicate(Predicate left, Predicate right) {
//todo: refactor to remove down casts
return new OrPredicate(left, right);
} |
223551095_1847 | @Override
public Predicate toPredicate(String prop, String val) {
return new NotPredicate(new EqualsPredicate<>(prop, val));
} |
223551095_1850 | @Override
public Predicate toPredicate(String prop, String val) {
return new EqualsPredicate<>(prop, val);
} |
223551095_1853 | @Override
public Predicate toPredicate(String prop, String val) throws InvalidQueryException {
if (val == null) {
throw new InvalidQueryException("IN operator is missing a required right operand for property " + prop);
}
String[] tokens = val.split(",");
List<EqualsPredicate> listPredicates = new ArrayList<... |
223551095_1856 | @Override
public Predicate toPredicate(String prop, String val) {
return new LessPredicate<>(prop, val);
} |
223551095_1859 | @Override
public Predicate toPredicate(Predicate left, Predicate right) {
return new NotPredicate(right);
} |
223551095_1862 | public Predicate parse(Token[] tokens) throws InvalidQueryException {
ParseContext ctx = parseExpressions(tokens);
List<Expression> listExpressions = ctx.getExpressions();
changeHostNameToLowerCase(listExpressions);
List<Expression> listMergedExpressions = mergeExpressions(listExpressions, ctx.getMaxPrece... |
223551095_1863 | public Predicate parse(Token[] tokens) throws InvalidQueryException {
ParseContext ctx = parseExpressions(tokens);
List<Expression> listExpressions = ctx.getExpressions();
changeHostNameToLowerCase(listExpressions);
List<Expression> listMergedExpressions = mergeExpressions(listExpressions, ctx.getMaxPrece... |
223551095_1864 | public Predicate parse(Token[] tokens) throws InvalidQueryException {
ParseContext ctx = parseExpressions(tokens);
List<Expression> listExpressions = ctx.getExpressions();
changeHostNameToLowerCase(listExpressions);
List<Expression> listMergedExpressions = mergeExpressions(listExpressions, ctx.getMaxPrece... |
223551095_1865 | public Predicate parse(Token[] tokens) throws InvalidQueryException {
ParseContext ctx = parseExpressions(tokens);
List<Expression> listExpressions = ctx.getExpressions();
changeHostNameToLowerCase(listExpressions);
List<Expression> listMergedExpressions = mergeExpressions(listExpressions, ctx.getMaxPrece... |
223551095_1866 | public Predicate parse(Token[] tokens) throws InvalidQueryException {
ParseContext ctx = parseExpressions(tokens);
List<Expression> listExpressions = ctx.getExpressions();
changeHostNameToLowerCase(listExpressions);
List<Expression> listMergedExpressions = mergeExpressions(listExpressions, ctx.getMaxPrece... |
223551095_1867 | public Predicate parse(Token[] tokens) throws InvalidQueryException {
ParseContext ctx = parseExpressions(tokens);
List<Expression> listExpressions = ctx.getExpressions();
changeHostNameToLowerCase(listExpressions);
List<Expression> listMergedExpressions = mergeExpressions(listExpressions, ctx.getMaxPrece... |
223551095_1868 | public Predicate parse(Token[] tokens) throws InvalidQueryException {
ParseContext ctx = parseExpressions(tokens);
List<Expression> listExpressions = ctx.getExpressions();
changeHostNameToLowerCase(listExpressions);
List<Expression> listMergedExpressions = mergeExpressions(listExpressions, ctx.getMaxPrece... |
223551095_1869 | public Predicate parse(Token[] tokens) throws InvalidQueryException {
ParseContext ctx = parseExpressions(tokens);
List<Expression> listExpressions = ctx.getExpressions();
changeHostNameToLowerCase(listExpressions);
List<Expression> listMergedExpressions = mergeExpressions(listExpressions, ctx.getMaxPrece... |
223551095_1870 | public Predicate parse(Token[] tokens) throws InvalidQueryException {
ParseContext ctx = parseExpressions(tokens);
List<Expression> listExpressions = ctx.getExpressions();
changeHostNameToLowerCase(listExpressions);
List<Expression> listMergedExpressions = mergeExpressions(listExpressions, ctx.getMaxPrece... |
223551095_1871 | public Predicate parse(Token[] tokens) throws InvalidQueryException {
ParseContext ctx = parseExpressions(tokens);
List<Expression> listExpressions = ctx.getExpressions();
changeHostNameToLowerCase(listExpressions);
List<Expression> listMergedExpressions = mergeExpressions(listExpressions, ctx.getMaxPrece... |
223551095_1872 | public Predicate parse(Token[] tokens) throws InvalidQueryException {
ParseContext ctx = parseExpressions(tokens);
List<Expression> listExpressions = ctx.getExpressions();
changeHostNameToLowerCase(listExpressions);
List<Expression> listMergedExpressions = mergeExpressions(listExpressions, ctx.getMaxPrece... |
223551095_1873 | public Predicate parse(Token[] tokens) throws InvalidQueryException {
ParseContext ctx = parseExpressions(tokens);
List<Expression> listExpressions = ctx.getExpressions();
changeHostNameToLowerCase(listExpressions);
List<Expression> listMergedExpressions = mergeExpressions(listExpressions, ctx.getMaxPrece... |
223551095_1874 | public Predicate parse(Token[] tokens) throws InvalidQueryException {
ParseContext ctx = parseExpressions(tokens);
List<Expression> listExpressions = ctx.getExpressions();
changeHostNameToLowerCase(listExpressions);
List<Expression> listMergedExpressions = mergeExpressions(listExpressions, ctx.getMaxPrece... |
223551095_1875 | public Predicate parse(Token[] tokens) throws InvalidQueryException {
ParseContext ctx = parseExpressions(tokens);
List<Expression> listExpressions = ctx.getExpressions();
changeHostNameToLowerCase(listExpressions);
List<Expression> listMergedExpressions = mergeExpressions(listExpressions, ctx.getMaxPrece... |
223551095_1877 | public Predicate parse(Token[] tokens) throws InvalidQueryException {
ParseContext ctx = parseExpressions(tokens);
List<Expression> listExpressions = ctx.getExpressions();
changeHostNameToLowerCase(listExpressions);
List<Expression> listMergedExpressions = mergeExpressions(listExpressions, ctx.getMaxPrece... |
223551095_1878 | public Predicate parse(Token[] tokens) throws InvalidQueryException {
ParseContext ctx = parseExpressions(tokens);
List<Expression> listExpressions = ctx.getExpressions();
changeHostNameToLowerCase(listExpressions);
List<Expression> listMergedExpressions = mergeExpressions(listExpressions, ctx.getMaxPrece... |
223551095_1879 | public Token[] tokens(String exp) throws InvalidQueryException {
return tokens(exp, Collections.emptySet());
} |
223551095_1880 | public Token[] tokens(String exp) throws InvalidQueryException {
return tokens(exp, Collections.emptySet());
} |
223551095_1881 | public Token[] tokens(String exp) throws InvalidQueryException {
return tokens(exp, Collections.emptySet());
} |
223551095_1882 | public Token[] tokens(String exp) throws InvalidQueryException {
return tokens(exp, Collections.emptySet());
} |
223551095_1883 | public Token[] tokens(String exp) throws InvalidQueryException {
return tokens(exp, Collections.emptySet());
} |
223551095_1884 | public Token[] tokens(String exp) throws InvalidQueryException {
return tokens(exp, Collections.emptySet());
} |
223551095_1885 | public Token[] tokens(String exp) throws InvalidQueryException {
return tokens(exp, Collections.emptySet());
} |
223551095_1886 | public Token[] tokens(String exp) throws InvalidQueryException {
return tokens(exp, Collections.emptySet());
} |
223551095_1887 | public Token[] tokens(String exp) throws InvalidQueryException {
return tokens(exp, Collections.emptySet());
} |
223551095_1888 | public Token[] tokens(String exp) throws InvalidQueryException {
return tokens(exp, Collections.emptySet());
} |
223551095_1889 | public Token[] tokens(String exp) throws InvalidQueryException {
return tokens(exp, Collections.emptySet());
} |
223551095_1890 | public Token[] tokens(String exp) throws InvalidQueryException {
return tokens(exp, Collections.emptySet());
} |
223551095_1891 | public Token[] tokens(String exp) throws InvalidQueryException {
return tokens(exp, Collections.emptySet());
} |
223551095_1892 | public Token[] tokens(String exp) throws InvalidQueryException {
return tokens(exp, Collections.emptySet());
} |
223551095_1893 | public Token[] tokens(String exp) throws InvalidQueryException {
return tokens(exp, Collections.emptySet());
} |
223551095_1894 | public Token[] tokens(String exp) throws InvalidQueryException {
return tokens(exp, Collections.emptySet());
} |
223551095_1895 | public Token[] tokens(String exp) throws InvalidQueryException {
return tokens(exp, Collections.emptySet());
} |
223551095_1896 | public Token[] tokens(String exp) throws InvalidQueryException {
return tokens(exp, Collections.emptySet());
} |
223551095_1897 | public Token[] tokens(String exp) throws InvalidQueryException {
return tokens(exp, Collections.emptySet());
} |
223551095_1898 | public Token[] tokens(String exp) throws InvalidQueryException {
return tokens(exp, Collections.emptySet());
} |
223551095_1899 | public Token[] tokens(String exp) throws InvalidQueryException {
return tokens(exp, Collections.emptySet());
} |
223551095_1900 | public Token[] tokens(String exp) throws InvalidQueryException {
return tokens(exp, Collections.emptySet());
} |
223551095_1901 | public Token[] tokens(String exp) throws InvalidQueryException {
return tokens(exp, Collections.emptySet());
} |
223551095_1902 | public Token[] tokens(String exp) throws InvalidQueryException {
return tokens(exp, Collections.emptySet());
} |
223551095_1903 | public Token[] tokens(String exp) throws InvalidQueryException {
return tokens(exp, Collections.emptySet());
} |
223551095_1904 | public Token[] tokens(String exp) throws InvalidQueryException {
return tokens(exp, Collections.emptySet());
} |
223551095_1905 | public Token[] tokens(String exp) throws InvalidQueryException {
return tokens(exp, Collections.emptySet());
} |
223551095_1906 | @Override
public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException {
HttpChannel connection = HttpConnection.getCurrentConnection().getHttpChannel();
connection.getRequest().setHandled(true);
response.setContentType(MimeTypes.Type.TEXT_PLA... |
223551095_1913 | @Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
if (request instanceof HttpServletRequest) {
HttpServletRequest httpServletRequest = (HttpServletRequest) request;
String contentType = httpServletRequest.getCon... |
223551095_1914 | public List<Stage> getActions(long requestId) {
return db.getAllStages(requestId);
} |
223551095_1915 | public String getRequestContext() {
return requestContext;
} |
223551095_1916 | @Override
@Transactional
@TransactionalLock(lockArea = LockArea.HRC_STATUS_CACHE, lockType = LockType.WRITE)
public void persistActions(Request request) throws AmbariException {
RequestEntity requestEntity = request.constructNewPersistenceEntity();
Long clusterId = -1L;
String clusterName = null;
Long requestId... |
223551095_1917 | @Override
@Transactional
@TransactionalLock(lockArea = LockArea.HRC_STATUS_CACHE, lockType = LockType.WRITE)
public void persistActions(Request request) throws AmbariException {
RequestEntity requestEntity = request.constructNewPersistenceEntity();
Long clusterId = -1L;
String clusterName = null;
Long requestId... |
223551095_1918 | @Override
@Transactional
public void hostRoleScheduled(Stage s, String hostname, String roleStr) {
HostRoleCommand hostRoleCommand = s.getHostRoleCommand(hostname, roleStr);
HostRoleCommandEntity entity = hostRoleCommandDAO.findByPK(hostRoleCommand.getTaskId());
if (entity != null) {
entity.setStartTime(hostR... |
223551095_1919 | @Override
public List<Long> getRequestsByStatus(RequestStatus status, int maxResults,
boolean ascOrder) {
if (null == status) {
return requestDAO.findAllRequestIds(maxResults, ascOrder);
}
EnumSet<HostRoleStatus> taskStatuses = null;
switch( status ){
case IN_PROGRESS:
taskStatuses = HostRoleSta... |
223551095_1920 | @Override
public List<Long> getRequestsByStatus(RequestStatus status, int maxResults,
boolean ascOrder) {
if (null == status) {
return requestDAO.findAllRequestIds(maxResults, ascOrder);
}
EnumSet<HostRoleStatus> taskStatuses = null;
switch( status ){
case IN_PROGRESS:
taskStatuses = HostRoleSta... |
223551095_1921 | @Override
public List<Long> getRequestsByStatus(RequestStatus status, int maxResults,
boolean ascOrder) {
if (null == status) {
return requestDAO.findAllRequestIds(maxResults, ascOrder);
}
EnumSet<HostRoleStatus> taskStatuses = null;
switch( status ){
case IN_PROGRESS:
taskStatuses = HostRoleSta... |
223551095_1922 | @Override
@Transactional
@TransactionalLock(lockArea = LockArea.HRC_STATUS_CACHE, lockType = LockType.WRITE)
public void persistActions(Request request) throws AmbariException {
RequestEntity requestEntity = request.constructNewPersistenceEntity();
Long clusterId = -1L;
String clusterName = null;
Long requestId... |
223551095_1923 | @Override
@Transactional
@TransactionalLock(lockArea = LockArea.HRC_STATUS_CACHE, lockType = LockType.WRITE)
public void persistActions(Request request) throws AmbariException {
RequestEntity requestEntity = request.constructNewPersistenceEntity();
Long clusterId = -1L;
String clusterName = null;
Long requestId... |
223551095_1924 | public ExecutionCommand getExecutionCommand() {
if (executionCommand != null) {
return executionCommand;
}
if( null == jsonExecutionCommand ){
throw new RuntimeException(
"Invalid ExecutionCommandWrapper, both object and string representations are null");
}
try {
executionCommand = gson.fr... |
223551095_1925 | public ExecutionCommand getExecutionCommand() {
if (executionCommand != null) {
return executionCommand;
}
if( null == jsonExecutionCommand ){
throw new RuntimeException(
"Invalid ExecutionCommandWrapper, both object and string representations are null");
}
try {
executionCommand = gson.fr... |
223551095_1926 | public ExecutionCommand getExecutionCommand() {
if (executionCommand != null) {
return executionCommand;
}
if( null == jsonExecutionCommand ){
throw new RuntimeException(
"Invalid ExecutionCommandWrapper, both object and string representations are null");
}
try {
executionCommand = gson.fr... |
223551095_1927 | public void doWork() throws AmbariException {
try {
unitOfWork.begin();
// grab a reference to this UnitOfWork's EM
threadEntityManager = entityManagerProvider.get();
// The first thing to do is to abort requests that are cancelled
processCancelledRequestsList();
// !!! getting the stages in p... |
223551095_1928 | protected boolean timeOutActionNeeded(HostRoleStatus status, Stage stage,
Host host, String role, long currentTime, long taskTimeout) throws
AmbariException {
if (( !status.equals(HostRoleStatus.QUEUED) ) &&
( ! status.equals(HostRoleStatus.IN_PROGRESS) )) {
return false;
}
// tasks are held in a ... |
223551095_1929 | public void doWork() throws AmbariException {
try {
unitOfWork.begin();
// grab a reference to this UnitOfWork's EM
threadEntityManager = entityManagerProvider.get();
// The first thing to do is to abort requests that are cancelled
processCancelledRequestsList();
// !!! getting the stages in p... |
223551095_1930 | public void doWork() throws AmbariException {
try {
unitOfWork.begin();
// grab a reference to this UnitOfWork's EM
threadEntityManager = entityManagerProvider.get();
// The first thing to do is to abort requests that are cancelled
processCancelledRequestsList();
// !!! getting the stages in p... |
223551095_1931 | public void setTaskTimeoutAdjustment(boolean val) {
taskTimeoutAdjustment = val;
} |
223551095_1932 | void cancelHostRoleCommands(Collection<HostRoleCommand> hostRoleCommands, String reason) throws AmbariException {
for (HostRoleCommand hostRoleCommand : hostRoleCommands) {
// There are no server actions in actionQueue
if (!Role.AMBARI_SERVER_ACTION.equals(hostRoleCommand.getRole())) {
if (hostRoleComma... |
223551095_1933 | void cancelHostRoleCommands(Collection<HostRoleCommand> hostRoleCommands, String reason) throws AmbariException {
for (HostRoleCommand hostRoleCommand : hostRoleCommands) {
// There are no server actions in actionQueue
if (!Role.AMBARI_SERVER_ACTION.equals(hostRoleCommand.getRole())) {
if (hostRoleComma... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.