From: <tho...@us...> - 2014-03-16 23:09:37
|
Revision: 7988 http://sourceforge.net/p/bigdata/code/7988 Author: thompsonbry Date: 2014-03-16 23:09:34 +0000 (Sun, 16 Mar 2014) Log Message: ----------- Commit of the initial LBS implementation. It is commented out in web.xml. This implementation is just a proof of concept. It needs to be hardened and developed significantly before it can be of any use. See #624 Modified Paths: -------------- branches/RDR/bigdata-jini/src/java/com/bigdata/journal/jini/ha/HAJournal-A.config branches/RDR/bigdata-jini/src/java/com/bigdata/journal/jini/ha/HAJournal-B.config branches/RDR/bigdata-jini/src/java/com/bigdata/journal/jini/ha/HAJournal-C.config branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/BigdataRDFServlet.java branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/BigdataServlet.java branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/HAStatusServletUtil.java branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/MultiTenancyServlet.java branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/QueryServlet.java branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/SD.java branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/VoID.java branches/RDR/bigdata-war/src/WEB-INF/web.xml Added Paths: ----------- branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/HALoadBalancerServlet.java branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/IHALoadBalancerPolicy.java Modified: branches/RDR/bigdata-jini/src/java/com/bigdata/journal/jini/ha/HAJournal-A.config =================================================================== --- branches/RDR/bigdata-jini/src/java/com/bigdata/journal/jini/ha/HAJournal-A.config 2014-03-16 22:59:51 UTC (rev 7987) +++ branches/RDR/bigdata-jini/src/java/com/bigdata/journal/jini/ha/HAJournal-A.config 2014-03-16 23:09:34 UTC (rev 7988) @@ -270,6 +270,11 @@ new NV(AbstractTransactionService.Options.MIN_RELEASE_AGE,"1"), + new NV(com.bigdata.journal.PlatformStatsPlugIn.Options.COLLECT_PLATFORM_STATISTICS,"true"), + new NV(com.bigdata.journal.GangliaPlugIn.Options.GANGLIA_LISTEN,"true"), + new NV(com.bigdata.journal.GangliaPlugIn.Options.GANGLIA_REPORT,"true"), + new NV(com.bigdata.journal.GangliaPlugIn.Options.REPORT_DELAY,"2000"), // NB: short delay is used to develop the HALBS. + }, bigdata.kb); } Modified: branches/RDR/bigdata-jini/src/java/com/bigdata/journal/jini/ha/HAJournal-B.config =================================================================== --- branches/RDR/bigdata-jini/src/java/com/bigdata/journal/jini/ha/HAJournal-B.config 2014-03-16 22:59:51 UTC (rev 7987) +++ branches/RDR/bigdata-jini/src/java/com/bigdata/journal/jini/ha/HAJournal-B.config 2014-03-16 23:09:34 UTC (rev 7988) @@ -272,6 +272,11 @@ new NV(AbstractTransactionService.Options.MIN_RELEASE_AGE,"1"), + new NV(com.bigdata.journal.PlatformStatsPlugIn.Options.COLLECT_PLATFORM_STATISTICS,"true"), + new NV(com.bigdata.journal.GangliaPlugIn.Options.GANGLIA_LISTEN,"true"), + new NV(com.bigdata.journal.GangliaPlugIn.Options.GANGLIA_REPORT,"true"), + new NV(com.bigdata.journal.GangliaPlugIn.Options.REPORT_DELAY,"2000"), // NB: short delay is used to develop the HALBS. + }, bigdata.kb); } Modified: branches/RDR/bigdata-jini/src/java/com/bigdata/journal/jini/ha/HAJournal-C.config =================================================================== --- branches/RDR/bigdata-jini/src/java/com/bigdata/journal/jini/ha/HAJournal-C.config 2014-03-16 22:59:51 UTC (rev 7987) +++ branches/RDR/bigdata-jini/src/java/com/bigdata/journal/jini/ha/HAJournal-C.config 2014-03-16 23:09:34 UTC (rev 7988) @@ -269,6 +269,10 @@ new NV(AbstractTransactionService.Options.MIN_RELEASE_AGE,"1"), + new NV(com.bigdata.journal.GangliaPlugIn.Options.GANGLIA_LISTEN,"true"), + new NV(com.bigdata.journal.GangliaPlugIn.Options.GANGLIA_REPORT,"true"), + new NV(com.bigdata.journal.GangliaPlugIn.Options.REPORT_DELAY,"2000"), // NB: short delay is used to develop the HALBS. + }, bigdata.kb); } Modified: branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/BigdataRDFServlet.java =================================================================== --- branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/BigdataRDFServlet.java 2014-03-16 22:59:51 UTC (rev 7987) +++ branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/BigdataRDFServlet.java 2014-03-16 23:09:34 UTC (rev 7988) @@ -39,7 +39,6 @@ import java.util.Properties; import javax.servlet.Servlet; -import javax.servlet.ServletContext; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -80,13 +79,6 @@ static private final transient Logger log = Logger.getLogger(BigdataRDFServlet.class); /** - * The name of the {@link ServletContext} attribute whose value is the - * {@link BigdataRDFContext}. - */ - static public final transient String ATTRIBUTE_RDF_CONTEXT = BigdataRDFContext.class - .getName(); - - /** * The name of the <code>UTF-8</code> character encoding. */ protected static final String UTF8 = "UTF-8"; @@ -123,53 +115,33 @@ } - final protected SparqlEndpointConfig getConfig() { - - return getBigdataRDFContext().getConfig(); +// /** +// * {@inheritDoc} +// * <p> +// * Note: Overridden to support read-only deployments. +// * +// * @see SparqlEndpointConfig#readOnly +// * @see ConfigParams#READ_ONLY +// */ +// @Override +// static boolean isWritable(final HttpServletRequest req, +// final HttpServletResponse resp) throws IOException { +// +// if(getConfig().readOnly) { +// +// buildResponse(resp, HTTP_METHOD_NOT_ALLOWED, MIME_TEXT_PLAIN, +// "Not writable."); +// +// // Not writable. Response has been committed. +// return false; +// +// } +// +// return super.isWritable(req, resp); +// +// } - } - - final protected BigdataRDFContext getBigdataRDFContext() { - - if (m_context == null) { - - m_context = getRequiredServletContextAttribute(ATTRIBUTE_RDF_CONTEXT); - - } - - return m_context; - - } - - private volatile BigdataRDFContext m_context; - /** - * {@inheritDoc} - * <p> - * Note: Overridden to support read-only deployments. - * - * @see SparqlEndpointConfig#readOnly - * @see ConfigParams#READ_ONLY - */ - @Override - protected boolean isWritable(final HttpServletRequest req, - final HttpServletResponse resp) throws IOException { - - if(getConfig().readOnly) { - - buildResponse(resp, HTTP_METHOD_NOT_ALLOWED, MIME_TEXT_PLAIN, - "Not writable."); - - // Not writable. Response has been committed. - return false; - - } - - return super.isWritable(req, resp); - - } - - /** * Write the stack trace onto the output stream. This will show up in the * client's response. This code path should be used iff we have already * begun writing the response. Otherwise, an HTTP error status should be @@ -274,7 +246,7 @@ if (timestamp == null) { - return getConfig().timestamp; + return getConfig(req.getServletContext()).timestamp; } @@ -319,7 +291,7 @@ } // use the default namespace. - return getConfig().namespace; + return getConfig(req.getServletContext()).namespace; } Modified: branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/BigdataServlet.java =================================================================== --- branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/BigdataServlet.java 2014-03-16 22:59:51 UTC (rev 7987) +++ branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/BigdataServlet.java 2014-03-16 23:09:34 UTC (rev 7988) @@ -29,6 +29,8 @@ import java.io.InputStreamReader; import java.io.OutputStream; import java.io.Writer; +import java.util.LinkedList; +import java.util.List; import javax.servlet.ServletContext; import javax.servlet.http.HttpServlet; @@ -41,6 +43,7 @@ import com.bigdata.journal.AbstractJournal; import com.bigdata.journal.IIndexManager; import com.bigdata.quorum.AbstractQuorum; +import com.bigdata.rdf.sail.webapp.HALoadBalancerServlet.InitParams; import com.bigdata.rdf.sail.webapp.client.IMimeTypes; /** @@ -58,11 +61,25 @@ /** * The name of the {@link ServletContext} attribute whose value is the + * {@link BigdataRDFContext}. + */ + static public final transient String ATTRIBUTE_RDF_CONTEXT = BigdataRDFContext.class + .getName(); + + /** + * The name of the {@link ServletContext} attribute whose value is the * {@link IIndexManager}. */ /*package*/ static final transient String ATTRIBUTE_INDEX_MANAGER = IIndexManager.class.getName(); + /** + * The {@link ServletContext} attribute whose value is the prefix for the + * {@link HALoadBalancerServlet} iff it is running. + */ + static final String ATTRIBUTE_LBS_PREFIX = HALoadBalancerServlet.class + .getName() + "." + InitParams.PREFIX; + // /** // * The {@link ServletContext} attribute whose value is the // * {@link SparqlCache}. @@ -91,12 +108,19 @@ HTTP_BADREQUEST = HttpServletResponse.SC_BAD_REQUEST, HTTP_METHOD_NOT_ALLOWED = HttpServletResponse.SC_METHOD_NOT_ALLOWED, HTTP_INTERNALERROR = HttpServletResponse.SC_INTERNAL_SERVER_ERROR, - HTTP_NOTIMPLEMENTED = HttpServletResponse.SC_NOT_IMPLEMENTED; + HTTP_NOTIMPLEMENTED = HttpServletResponse.SC_NOT_IMPLEMENTED; - protected <T> T getRequiredServletContextAttribute(final String name) { + static <T> T getRequiredServletContextAttribute( + final ServletContext servletContext, final String name) { + if (servletContext == null) + throw new IllegalArgumentException(); + + if (name == null) + throw new IllegalArgumentException(); + @SuppressWarnings("unchecked") - final T v = (T) getServletContext().getAttribute(name); + final T v = (T) servletContext.getAttribute(name); if (v == null) throw new RuntimeException("Not set: " + name); @@ -105,15 +129,55 @@ } + static final SparqlEndpointConfig getConfig( + final ServletContext servletContext) { + + return getBigdataRDFContext(servletContext).getConfig(); + + } + + protected final BigdataRDFContext getBigdataRDFContext() { + + return getBigdataRDFContext(getServletContext()); + + } + + static final BigdataRDFContext getBigdataRDFContext( + final ServletContext servletContext) { + +// if (m_context == null) { +// +// m_context = + return getRequiredServletContextAttribute(servletContext, + ATTRIBUTE_RDF_CONTEXT); + +// } +// +// return m_context; + + } + +// private volatile BigdataRDFContext m_context; + /** * The backing {@link IIndexManager}. */ - protected IIndexManager getIndexManager() { - - return getRequiredServletContextAttribute(ATTRIBUTE_INDEX_MANAGER); - - } + protected IIndexManager getIndexManager() { + + return getIndexManager(getServletContext()); + + } + /** + * The backing {@link IIndexManager}. + */ + static IIndexManager getIndexManager(final ServletContext servletContext) { + + return getRequiredServletContextAttribute(servletContext, + ATTRIBUTE_INDEX_MANAGER); + + } + // /** // * Return the {@link Quorum} -or- <code>null</code> if the // * {@link IIndexManager} is not participating in an HA {@link Quorum}. @@ -137,10 +201,11 @@ * {@link IIndexManager} is not an {@link AbstractQuorum} or is not HA * enabled. */ - protected HAStatusEnum getHAStatus() { + static public HAStatusEnum getHAStatus(final IIndexManager indexManager) { + + if (indexManager == null) + throw new IllegalArgumentException(); - final IIndexManager indexManager = getIndexManager(); - if (indexManager instanceof AbstractJournal) { // Note: Invocation against local object (NOT RMI). @@ -163,10 +228,20 @@ * * @throws IOException */ - protected boolean isWritable(final HttpServletRequest req, + static boolean isWritable(final HttpServletRequest req, final HttpServletResponse resp) throws IOException { - final HAStatusEnum haStatus = getHAStatus(); + if(getConfig(req.getServletContext()).readOnly) { + + buildResponse(resp, HTTP_METHOD_NOT_ALLOWED, MIME_TEXT_PLAIN, + "Not writable."); + + // Not writable. Response has been committed. + return false; + + } + final HAStatusEnum haStatus = getHAStatus(getIndexManager(req + .getServletContext())); if (haStatus == null) { // No quorum. return true; @@ -195,10 +270,11 @@ * * @throws IOException */ - protected boolean isReadable(final HttpServletRequest req, + static boolean isReadable(final HttpServletRequest req, final HttpServletResponse resp) throws IOException { - final HAStatusEnum haStatus = getHAStatus(); + final HAStatusEnum haStatus = getHAStatus(getIndexManager(req + .getServletContext())); if (haStatus == null) { // No quorum. return true; @@ -279,7 +355,99 @@ // return getRequiredServletContextAttribute(ATTRIBUTE_SPARQL_CACHE); // // } - + + /** + * Return the serviceURI(s) for this service (one or more). + * + * @param req + * The request. + * + * @return The known serviceURIs for this service. + */ + static public String[] getServiceURIs(final HttpServletRequest req) { + + // One or more. + final List<String> serviceURIs = new LinkedList<String>(); + + /* + * Figure out the service end point. + * + * Note: This is just the requestURL as reported. This makes is + * possible to support virtual hosting and similar http proxy + * patterns since the SPARQL end point is just the URL at which the + * service is responding. + */ + final String uri; + { + + final StringBuffer sb = req.getRequestURL(); + + final int indexOf = sb.indexOf("?"); + + if (indexOf == -1) { + uri = sb.toString(); + } else { + uri = sb.substring(0, indexOf); + } + serviceURIs.add(uri); + + } + + /** + * If the load balancer servlet is registered, then get its effective + * service URI. This will be a load balanced version of the serviceURI + * that we obtained above. We are trying to go from + * + * http://localhost:8080/bigdata/sparql + * + * to + * + * http://localhost:8080/bigdata/LBS/sparql + * + * where LBS is the prefix of the load balancer servlet. + */ + { + final String prefix = (String) req.getServletContext() + .getAttribute(ATTRIBUTE_LBS_PREFIX); + + if (prefix != null) { + + // locate the // in the protocol. + final int doubleSlash = uri.indexOf("//"); + + // skip past that and locate the next / + final int nextSlash = uri + .indexOf('/', doubleSlash + 2/* fromIndex */); + + // The ContextPath for the webapp. This should be the next thing + // in the [uri]. + final String contextPath = req.getServletContext() + .getContextPath(); + + // The index of the end of the ContextPath. + final int endContextPath = nextSlash + + contextPath.length(); + + // everything up to the *start* of the ContextPath + final String baseURL = uri.substring(0/* beginIndex */, + nextSlash/* endIndex */); + + final String s = baseURL // base URL + + prefix // LBS prefix (includes ContextPath) + + (prefix.endsWith("/") ? "" : "/") + + uri.substring(endContextPath + 1) // remainder of requestURL. + ; + + serviceURIs.add(s); + + } + + } + + return serviceURIs.toArray(new String[serviceURIs.size()]); + + } + static public void buildResponse(final HttpServletResponse resp, final int status, final String mimeType) throws IOException { Added: branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/HALoadBalancerServlet.java =================================================================== --- branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/HALoadBalancerServlet.java (rev 0) +++ branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/HALoadBalancerServlet.java 2014-03-16 23:09:34 UTC (rev 7988) @@ -0,0 +1,1036 @@ +/** +Copyright (C) SYSTAP, LLC 2006-2007. All rights reserved. + +Contact: + SYSTAP, LLC + 4501 Tower Road + Greensboro, NC 27410 + lic...@bi... + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; version 2 of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +package com.bigdata.rdf.sail.webapp; + +import java.io.IOException; +import java.net.URI; +import java.util.Arrays; +import java.util.Comparator; +import java.util.UUID; +import java.util.concurrent.atomic.AtomicReference; + +import javax.servlet.ServletConfig; +import javax.servlet.ServletContext; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.log4j.Logger; +import org.eclipse.jetty.proxy.ProxyServlet; + +import com.bigdata.ganglia.GangliaService; +import com.bigdata.ganglia.HostReportComparator; +import com.bigdata.ganglia.IHostReport; +import com.bigdata.ha.HAGlue; +import com.bigdata.ha.QuorumService; +import com.bigdata.journal.GangliaPlugIn; +import com.bigdata.journal.IIndexManager; +import com.bigdata.journal.PlatformStatsPlugIn; +import com.bigdata.journal.jini.ha.HAJournal; +import com.bigdata.quorum.Quorum; + +/** + * + The HA Load Balancer servlet provides a transparent proxy for requests + * arriving its configured URL pattern (the "external" interface for the load + * balancer) to the root of the web application. + * <P> + * The use of the load balancer is entirely optional. If the security rules + * permit, then clients MAY make requests directly against a specific service. + * Thus, no specific provision exists to disable the load balancer servlet, but + * you may choose not to deploy it. + * <p> + * When successfully deployed, requests having prefix corresponding to the URL + * pattern for the load balancer (typically, "/bigdata/LBS/*") are automatically + * redirected to a joined service in the met quorum based on the configured load + * balancer policy. + * <p> + * The load balancer policies are "HA aware." They will always redirect update + * requests to the quorum leader. The default polices will load balance read + * requests over the leader and followers in a manner that reflects the CPU, IO + * Wait, and GC Time associated with each service. The PlatformStatsPlugIn and + * GangliaPlugIn MUST be enabled for the default load balancer policy to + * operate. It depends on those plugins to maintain a model of the load on the + * HA replication cluster. The GangliaPlugIn should be run only as a listener if + * you are are running the real gmond process on the host. If you are not + * running gmond, then the GangliaPlugIn should be configured as both a listener + * and a sender. + * + * @author <a href="mailto:tho...@us...">Bryan Thompson</a> + * + * @see <a href="http://trac.bigdata.com/ticket/624"> HA Load Balancer </a> + * + * TODO Define some interesting load balancer policies. We can start with + * HA aware round robin and an HA aware policy that is load balanced based + * on the ganglia reported metrics model. + * + * All policies must be HA aware - we only want to send requests to + * services that are joined with the met quorum. + * + * TODO If the target service winds up not joined with the met quorum by + * the time we get there, what should it do? Report an error since we are + * already on its internal interface? Will this servlet see that error? If + * it does, should it handle it? + */ +public class HALoadBalancerServlet extends ProxyServlet { + + private static final Logger log = Logger + .getLogger(HALoadBalancerServlet.class); + + /** + * + */ + private static final long serialVersionUID = 1L; + + public interface InitParams { + +// String ENABLED = "enabled"; +// +// String DEFAULT_ENABLED = "false"; + + /** + * The prefix at which the load balancer is deployed (its URL pattern, + * less any wildcard). This is typically + * + * <pre> + * /bigdata/LBS + * </pre> + * + * but the actual value depends on the servlet mappined established in + * <code>web.xml</code>. + */ + String PREFIX = "prefix"; + + /** + * The load balancer policy (optional). This must be an instance of + * {@link IHALoadBalancerPolicy}. + */ + String POLICY = "policy"; + + String DEFAULT_POLICY = DefaultLBSPolicy.class.getName(); + + /** + * A {@link Comparator} that places {@link IHostReport}s into a total + * ordering from the host with the least load to the host with the + * greatest load (optional). + */ + String COMPARATOR = "comparator"; + + String DEFAULT_COMPARATOR = DefaultHostReportComparator.class.getName(); + + } + + public HALoadBalancerServlet() { + super(); + } + + private boolean enabled = false; + private String prefix = null; + private IHALoadBalancerPolicy policy; + private Comparator<IHostReport> comparator; + private GangliaService gangliaService; + private String[] reportOn; + + @SuppressWarnings("unchecked") + @Override + public void init() throws ServletException { + + super.init(); + + final ServletConfig servletConfig = getServletConfig(); + + final ServletContext servletContext = servletConfig.getServletContext(); + + prefix = servletConfig.getInitParameter(InitParams.PREFIX); + + policy = newInstance(servletConfig, IHALoadBalancerPolicy.class, + InitParams.POLICY, InitParams.DEFAULT_POLICY); + + comparator = newInstance(servletConfig, Comparator.class, + InitParams.COMPARATOR, InitParams.DEFAULT_COMPARATOR); + + final IIndexManager indexManager = BigdataServlet + .getIndexManager(servletContext); + + if (!(indexManager instanceof HAJournal)) { + throw new ServletException("Not HA"); + } + + final HAJournal journal = (HAJournal) indexManager; + + if (journal.getPlatformStatisticsCollector() == null) { + throw new ServletException("LBS requires " + + PlatformStatsPlugIn.class.getName()); + } + + gangliaService = (GangliaService) journal.getGangliaService(); + + if (gangliaService == null) { + throw new ServletException("LBS requires " + + GangliaPlugIn.class.getName()); + } + + reportOn = gangliaService.getDefaultHostReportOn(); + + enabled = true; + + servletContext.setAttribute(BigdataServlet.ATTRIBUTE_LBS_PREFIX, + prefix); + + if (log.isInfoEnabled()) + log.info(servletConfig.getServletName() + " @ " + prefix); + + } + + @Override + public void destroy() { + + enabled = false; + + prefix = null; + + policy = null; + + comparator = null; + + reportOn = null; + + gangliaService = null; + + getServletContext().setAttribute(BigdataServlet.ATTRIBUTE_LBS_PREFIX, + null); + + super.destroy(); + + } + + /** + * Create an instance of some type based on the servlet init parameters. + * + * @param servletConfig + * The {@link ServletConfig}. + * @param iface + * The interface that the type must implement. + * @param name + * The name of the servlet init parameter. + * @param def + * The default value for the servlet init parameter. + * + * @return The instance of the configured type. + * + * @throws ServletException + * if anything goes wrong. + */ + @SuppressWarnings("unchecked") + private static <T> T newInstance(final ServletConfig servletConfig, + final Class<? extends T> iface, final String name, final String def) + throws ServletException { + + final T t; + + String s = servletConfig.getInitParameter(name); + + if (s == null || s.trim().length() == 0) { + + s = def; + + } + + final Class<? extends T> cls; + try { + cls = (Class<? extends T>) Class.forName(s); + } catch (ClassNotFoundException e) { + throw new ServletException("cls=" + s + "cause=" + e, e); + } + + if (!iface.isAssignableFrom(cls)) + throw new IllegalArgumentException(name + ":: " + s + + " must extend " + iface.getName()); + + try { + t = (T) cls.newInstance(); + } catch (InstantiationException e) { + throw new ServletException(e); + } catch (IllegalAccessException e) { + throw new ServletException(e); + } + + return t; + + } + + @Override + protected void service(final HttpServletRequest request, + final HttpServletResponse response) throws ServletException, + IOException { + + if (!enabled) { + // The LBS is not available. + response.sendError(HttpServletResponse.SC_NOT_FOUND); + } + + final HostScore[] hosts = hostTable.get(); + + if (hosts == null || hosts.length == 0) { + + // Ensure that the host table exists. + updateHostsTable(); + + } + + final HAGlueScore[] services = serviceTable.get(); + + if (services == null || services.length == 0) { + + /* + * Ensure that the service table exists (more correctly, attempt to + * populate it, but we can only do that if the HAQuorumService is + * running.) + */ + + updateServicesTable(); + + } + + /* + * TODO if rewriteURL() returns null, then the base class (ProxyServlet) + * returns SC_FORBIDDEN. It should return something less ominous, like a + * 404. With an explanation. Or a RETRY. + */ + super.service(request, response); + + } + + /** + * Update the per-host scoring table. + * + * @see #hostTable + * + * FIXME This MUST be updated on a periodic basis. We can probably + * query the gangliaService to figure out how often it gets updates, or + * we can do this every 5 seconds or so (the ganglia updates are not + * synchronized across a cluster - they just pour in). + * + * TODO For scalability on clusters with a lot of ganglia chatter, we + * should only keep the data from those hosts that are of interest for + * a given HA replication cluster. The load on other hosts has no + * impact on our decision when load balancing within an HA replication + * cluster. + */ + private void updateHostsTable() { + + /* + * Note: If there is more than one service on the same host, then we + * will have one record per host, not per service. + * + * Note: The actual metrics that are available depend on the OS and on + * whether you are running gmond or having the GangliaPlugIn do its own + * reporting. The policy that ranks the host reports should be robust to + * these variations. + */ + final IHostReport[] hostReport = gangliaService.getHostReport(// + reportOn,// metrics to be reported. + comparator// imposes order on the host reports. + ); + + log.warn("hostReport=" + Arrays.toString(hostReport)); + + final HostScore[] scores = new HostScore[hostReport.length]; + + for (int i = 0; i < hostReport.length; i++) { + + final IHostReport r = hostReport[i]; + + /* + * TODO This is ignoring the metrics for the host and weighting all + * hosts equally. + */ + scores[i++] = new HostScore(r.getHostName(), 1.0, + (double) hostReport.length); + + } + + // sort into ascending order (increasing activity). + Arrays.sort(scores); + + for (int i = 0; i < scores.length; i++) { + + scores[i].rank = i; + + scores[i].drank = ((double) i) / scores.length; + + } + + if (log.isDebugEnabled()) { + + log.debug("The most active index was: " + scores[scores.length - 1]); + + log.debug("The least active index was: " + scores[0]); + + } + + this.hostTable.set(scores); + + } + + /** + * Update the per-service table. + * + * @see #serviceTable + * + * FIXME This MUST be maintained by appropriate watchers such that we + * just consult the as maintained information and act immediately on + * it. We can not afford any latency for RMI or even figuring out which + * the host has the least load. That should all be maintained by a + * scheduled thread and listeners. + */ + private void updateServicesTable() { + + final ServletContext servletContext = getServletContext(); + + final HAJournal journal = (HAJournal) BigdataServlet + .getIndexManager(servletContext); + + final Quorum<HAGlue, QuorumService<HAGlue>> quorum = journal.getQuorum(); + + /* + * Note: This is the *local* HAGlueService. + * + * This page must be robust to some new failure modes. The ZooKeeper + * client can now be associated with an expired session, River discovery + * can now be disabled, and the HAQuorumService might not be available + * from quorum.getClient(). All of those things can happen if there is a + * zookeeper session expiration that forces us to terminate the + * HAQuorumService. This condition will be cured automatically (unless + * the service is being shutdown), but only limited status information + * can be provided while the HAQuorumService is not running. + */ + final QuorumService<HAGlue> quorumService; + { + QuorumService<HAGlue> t; + try { + t = (QuorumService) quorum.getClient(); + } catch (IllegalStateException ex) { + // Note: Not available (quorum.start() not called). + return; + } + quorumService = t; + } + + final UUID[] joined = quorum.getJoined(); + final HAGlueScore[] serviceScores = new HAGlueScore[joined.length]; + + for (int i = 0; i < joined.length; i++) { + final UUID serviceId = joined[i]; + try { + + /* + * TODO Scan the existing table before doing an RMI to the + * service. We only need to do the RMI for a new service, not + * one in the table. + * + * TODO A services HashMap<UUID,HAGlueScore> would be much more + * efficient than a table. If we use a CHM, then we can do this + * purely asynchronously as the HAGlue services entire the set + * of joined services. + */ + serviceScores[i] = new HAGlueScore(servletContext, serviceId); + + } catch (RuntimeException ex) { + + /* + * Ignore. Might not be an HAGlue instance. + */ + + if (log.isInfoEnabled()) + log.info(ex, ex); + + continue; + + } + + } + + this.serviceTable.set(serviceScores); + + } + + /* + * FIXME Choose among pre-computed and maintained proxy targets based on the + * LBS policy. + */ + private static final String _proxyTo = "http://localhost:8091/bigdata"; + + /** + * The table of pre-scored hosts. + * + * TODO There is an entry for all known hosts, but not all hosts are running + * service that we care about. So we have to run over the table, filtering + * for hosts that have services that we care about. + */ + private final AtomicReference<HostScore[]> hostTable = new AtomicReference<HostScore[]>( + null); + + /** + * This is the table of known services. We can scan the table for a service + * {@link UUID} and then forward a request to the pre-computed requestURL + * associated with that {@link UUID}. If the requestURL is <code>null</code> + * then we do not know how to reach that service and can not proxy the + * request. + */ + private final AtomicReference<HAGlueScore[]> serviceTable = new AtomicReference<HAGlueScore[]>( + null); + + /** + * For update requests, rewrite the requestURL to the service that is the + * quorum leader. For read requests, rewrite the requestURL to the service + * having the least load. + */ + @Override + protected URI rewriteURI(final HttpServletRequest request) + { + final String path = request.getRequestURI(); + if (!path.startsWith(prefix)) + return null; + + final boolean isUpdate = isUpdateRequest(request); + final String proxyTo; + if(isUpdate) { + // Proxy to leader. + proxyTo = getLeaderURL(request); + } else { + // Proxy to any joined service. + proxyTo = getReaderURL(request); + } + if (proxyTo == null) { + // Could not rewrite. + return null; + } + final StringBuilder uri = new StringBuilder(proxyTo); + if (proxyTo.endsWith("/")) + uri.setLength(uri.length() - 1); + final String rest = path.substring(prefix.length()); + if (!rest.startsWith("/")) + uri.append("/"); + uri.append(rest); + final String query = request.getQueryString(); + if (query != null) + uri.append("?").append(query); + final URI rewrittenURI = URI.create(uri.toString()).normalize(); + + if (!validateDestination(rewrittenURI.getHost(), rewrittenURI.getPort())) + return null; + + if (log.isInfoEnabled()) + log.info("rewrote: " + path + " => " + rewrittenURI); + + return rewrittenURI; + } + + /** + * Return <code>true</code> iff this is an UPDATE request that must be + * proxied to the quorum leader. + * + * FIXME How do we identify "UPDATE" requests? DELETE and PUT are update + * requests, but POST is not always an UPDATE. It can also be used for + * QUERY. GET is never an UPDATE request, and that is what this is based on + * right now. + */ + private boolean isUpdateRequest(HttpServletRequest request) { + + return !request.getMethod().equalsIgnoreCase("GET"); + + } + + private String getLeaderURL(final HttpServletRequest request) { + + final ServletContext servletContext = request.getServletContext(); + + final HAJournal journal = (HAJournal) BigdataServlet + .getIndexManager(servletContext); + + final Quorum<HAGlue, QuorumService<HAGlue>> quorum = journal.getQuorum(); + + final UUID leaderId = quorum.getLeaderId(); + + if (leaderId == null) { + // No quorum, so no leader. Can not proxy the request. + return null; + } + + /* + * Scan the services table to locate the leader and then proxy the + * request to the pre-computed requestURL for the leader. If that + * requestURL is null then we do not know about a leader and can not + * proxy the request at this time. + */ + + final HAGlueScore[] services = serviceTable.get(); + + if (services == null) { + + // No services. Can't proxy. + return null; + + } + + for (HAGlueScore s : services) { + + if (s.serviceUUID.equals(leaderId)) { + + // Found it. Proxy if the serviceURL is defined. + return s.requestURL; + + } + + } + + // Not found. Won't proxy. + return null; + + } + + /** + * Return the requestURL to which we will proxy a read request. + * + * @param request + * The request. + * + * @return The proxyTo URL -or- <code>null</code> if we could not find a + * service to which we could proxy this request. + */ + private String getReaderURL(final HttpServletRequest request) { + + final HostScore[] hostScores = this.hostTable.get(); + + if (hostScores == null) { + // Can't proxy to anything. + return null; + } + + // Choose a host : TODO This is just a round robin over the hosts. + HostScore hostScore = null; + for (int i = 0; i < hostScores.length; i++) { + + final int hostIndex = (i + nextHost) % hostScores.length; + + hostScore = hostScores[hostIndex]; + + if (hostScore == null) + continue; + + nextHost = hostIndex + 1; + + } + + if (hostScore == null) { + + // No hosts. Can't proxy. + return null; + + } + + final HAGlueScore[] services = this.serviceTable.get(); + + if (services == null) { + + // No services. Can't proxy. + return null; + + } + + /* + * Find a service on that host. + * + * TODO If none found, the try other hosts until we have tried each host + * once and then give up by returning null. This will require pushing + * down the service finder into a method that we call from the hosts + * loop. + */ + for(HAGlueScore x : services) { + + if (x.hostname == null) { + // Can't use if no hostname. + continue; + } + + if (x.requestURL == null) { + // Can't use if no requestURL. + continue; + } + + if (!x.hostname.equals(hostScore.hostname)) { + // This service is not on the host we are looking for. + continue; + } + + return x.requestURL; + + } + + // No service found on that host. + return null; + + } + int nextHost = 0; + + /** Place into descending order by load_one. */ + public static class DefaultHostReportComparator extends + HostReportComparator implements Comparator<IHostReport> { + + public DefaultHostReportComparator() { + super("load_one", true/* asc */); + } + + } + + /** + * Stochastically proxy the request to the services based on their load. + * + * @author <a href="mailto:tho...@us...">Bryan + * Thompson</a> + */ + public static class DefaultLBSPolicy implements IHALoadBalancerPolicy { + + @Override + public String proxyTo(HttpServletRequest req) { + // TODO Auto-generated method stub + return null; + } + + } + + /** + * Always proxy the request to the local service even if it is not HA ready + * (this policy defeats the load balancer). + * + * @author <a href="mailto:tho...@us...">Bryan + * Thompson</a> + */ + public static class NOPLBSPolicy implements IHALoadBalancerPolicy { + + @Override + public String proxyTo(HttpServletRequest req) { + // TODO Auto-generated method stub + return null; + } + + } + + // TODO Define a host report comparator which uses the metrics that we care + // about (CPU, IOWait, GC Time). + +// /** +// * The default out-of-the-box comparator for ordering the hosts based on the +// * metrics that we care about (CPU, IO Wait, GC Time). +// * +// * @author <a href="mailto:tho...@us...">Bryan +// * Thompson</a> +// */ +// public class MyHostReportComparator implements Comparator<IHostReport> { +// +// public MyHostReportComparator() { +// +// } +// +// @Override +// public int compare(final IHostReport o1, final IHostReport o2) { +// +// final int ret = comp(o1, o2); +// +// return -ret; +// +// } +// +// private int comp(final IHostReport o1, final IHostReport o2) { +// +// final IGangliaMetricMessage m1 = o1.getMetrics().get(metricName); +// +// final IGangliaMetricMessage m2 = o2.getMetrics().get(metricName); +// +// if (m1 == null && m2 == null) +// return 0; +// else if (m1 == null) +// return -1; +// else if (m2 == null) +// return -1; +// +// final double d1 = Double.parseDouble(m1.getStringValue()); +// +// final double d2 = Double.parseDouble(m2.getStringValue()); +// +// if (d1 < d2) +// return -1; +// else if (d2 > d1) +// return 1; +// +// /* +// * Order by host name in case of a tie on the metric. This makes the +// * results more stable. (We could also round the metric a little to +// * improve stability. But that can be done in a custom comparator.) +// */ +// +// return o1.getHostName().compareTo(o2.getHostName()); +// +// } +// +// } + + /** + * Helper class caches metadata about an {@link HAGlue} service. + * <p> + * Note: This class is written fairly defensively. The fields can wind up + * being left at their default values (typically <code>null</code>) if we + * are not able to find the necessary information for the {@link HAGlue} + * service. Users of this class must test for <code>null</code> values and + * skip over those services since they have not been pre-resolved to a host + * and requestURL. + */ + private static class HAGlueScore { + + final UUID serviceUUID; + HAGlue haGlue; + String hostname; + int port; + /** + * The {@link #requestURL} is assigned IFF everything succeeds. This is + * what we will use to proxy a request to the service having the + * {@link UUID} given to the constuctor. + * + * Note: This needs to be a URL, not just a relative path. At least with + * the rewriteURI() code in the outer class. Otherwise you get an NPE. + */ + String requestURL; + + public HAGlueScore(final ServletContext servletContext, + final UUID serviceUUID) { + + if (servletContext == null) + throw new IllegalArgumentException(); + + if (serviceUUID == null) + throw new IllegalArgumentException(); + + this.serviceUUID = serviceUUID; + + final HAJournal journal = (HAJournal) BigdataServlet + .getIndexManager(servletContext); + + final Quorum<HAGlue, QuorumService<HAGlue>> quorum = journal + .getQuorum(); + + if (quorum == null) { + // No quorum. + return; + } + + /* + * Note: This is the *local* HAGlueService. + * + * This page must be robust to some new failure modes. The ZooKeeper + * client can now be associated with an expired session, River discovery + * can now be disabled, and the HAQuorumService might not be available + * from quorum.getClient(). All of those things can happen if there is a + * zookeeper session expiration that forces us to terminate the + * HAQuorumService. This condition will be cured automatically (unless + * the service is being shutdown), but only limited status information + * can be provided while the HAQuorumService is not running. + */ + final QuorumService<HAGlue> quorumService; + { + QuorumService<HAGlue> t; + try { + t = (QuorumService) quorum.getClient(); + } catch (IllegalStateException ex) { + // Note: Not available (quorum.start() not called). + return; + } + quorumService = t; + } + + try { + haGlue = quorumService.getService(serviceUUID); + } catch (IllegalArgumentException ex) { + // No such service. + return; + } + + /* + * TODO The hostname and port are RMIs. Use a smart proxy. + */ + try { + hostname = haGlue.getHostname(); + port = haGlue.getNSSPort(); + } catch (IOException ex) { + // RMI error. + return; + } + + final String contextPath = servletContext.getContextPath(); + + requestURL = "http://" + hostname + ":" + port + + contextPath; + + } + + } + + /** + * Helper class assigns a raw and a normalized score to each host based on + * its per-host. + * + * @author <a href="mailto:tho...@us...">Bryan + * Thompson</a> + */ + private static class HostScore implements Comparable<HostScore> { + + /** The hostname. */ + private final String hostname; + + /** The raw (write) score computed for that index partition. */ + private final double rawScore; + + /** The normalized score computed for that index partition. */ + private final double score; + + /** The rank in [0:#scored]. This is an index into the Scores[]. */ + private int rank = -1; + + /** The normalized double precision rank in [0.0:1.0]. */ + private double drank = -1d; + + @Override + public String toString() { + + return "Score{hostname=" + hostname + ", rawScore=" + rawScore + + ", score=" + score + ", rank=" + rank + ", drank=" + + drank + "}"; + + } + + public HostScore(final String hostname, final double rawScore, + final double totalRawScore) { + + this.hostname = hostname; + + this.rawScore = rawScore; + + score = normalize(rawScore, totalRawScore); + + } + + /** + * Places elements into order by ascending {@link #rawScore}. The + * {@link #hostname} is used to break any ties. + */ + public int compareTo(final HostScore arg0) { + + if (rawScore < arg0.rawScore) { + + return -1; + + } else if (rawScore > arg0.rawScore) { + + return 1; + + } + + return hostname.compareTo(arg0.hostname); + + } + + } + + /** + * Places {@link HostScore} into ascending order (lowest score to highest + * score). Ties are broken based on an alpha sort of the index name. + */ + static private class ASC implements Comparator<HostScore> { + + public int compare(HostScore arg0, HostScore arg1) { + + if (arg0.rawScore < arg1.rawScore) { + + return -1; + + } else if (arg0.rawScore > arg1.rawScore) { + + return 1; + + } + + return arg0.hostname.compareTo(arg1.hostname); + + } + + } + + /** + * Places {@link HostScore} into descending order (highest score to lowest + * score). Ties are broken based on an alpha sort of the index name. + */ + static private class DESC implements Comparator<HostScore> { + + public int compare(HostScore arg0, HostScore arg1) { + + if (arg1.rawScore < arg0.rawScore) { + + return -1; + + } else if (arg1.rawScore > arg0.rawScore) { + + return 1; + + } + + return arg0.hostname.compareTo(arg1.hostname); + + } + + } + + /** + * Normalizes a raw score in the context of totals for some data + * service. + * + * @param rawScore + * The raw score. + * @param totalRawScore + * The raw score computed from the totals. + * + * @return The normalized score. + */ + static public double normalize(final double rawScore, + final double totalRawScore) { + + if (totalRawScore == 0d) { + + return 0d; + + } + + return rawScore / totalRawScore; + + } + +} Modified: branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/HAStatusServletUtil.java =================================================================== --- branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/HAStatusServletUtil.java 2014-03-16 22:59:51 UTC (rev 7987) +++ branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/HAStatusServletUtil.java 2014-03-16 23:09:34 UTC (rev 7988) @@ -216,6 +216,14 @@ + quorumService.getLogicalServiceZPath()).node("br") .close(); + p.text("PlatformStatsPlugIn=" + + (journal.getPlatformStatisticsCollector() == null ? "N/A" + : "Running")).node("br").close(); + + p.text("GangliaPlugIn=" + + (journal.getGangliaService() == null ? "N/A" + : "Running")).node("br").close(); + // Note: This is the *local* value of getHAStatus(). // Note: The HAReady token reflects whether or not the service // is Added: branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/IHALoadBalancerPolicy.java =================================================================== --- branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/IHALoadBalancerPolicy.java (rev 0) +++ branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/IHALoadBalancerPolicy.java 2014-03-16 23:09:34 UTC (rev 7988) @@ -0,0 +1,49 @@ +/** +Copyright (C) SYSTAP, LLC 2006-2007. All rights reserved. + +Contact: + SYSTAP, LLC + 4501 Tower Road + Greensboro, NC 27410 + lic...@bi... + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; version 2 of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +package com.bigdata.rdf.sail.webapp; + +import javax.servlet.http.HttpServletRequest; + +/** + * Load balancer policy interface. + * + * @author <a href="mailto:tho...@us...">Bryan Thompson</a> + * + * @see HALoadBalancerServlet + * @see <a href="http://trac.bigdata.com/ticket/624">HA Load Balancer</a> + */ +public interface IHALoadBalancerPolicy { + + /** + * Return the URL to which the request will be proxied. The returned URL + * must include the protocol, hostname and port (if a non-default port will + * be used) as well as the target request path. + * + * @param req + * The request. + * + * @return The URL. + */ + String proxyTo(HttpServletRequest req); + +} Modified: branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/MultiTenancyServlet.java =================================================================== --- branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/MultiTenancyServlet.java 2014-03-16 22:59:51 UTC (rev 7987) +++ branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/MultiTenancyServlet.java 2014-03-16 23:09:34 UTC (rev 7988) @@ -581,15 +581,8 @@ final BNode aDataSet = g.getValueFactory().createBNode(); - /* - * Figure out the service end point. - * - * Note: This is just the requestURL as reported. This makes is - * possible to support virtual hosting and similar http proxy - * patterns since the SPARQL end point is just the URL at which the - * service is responding. - */ - final String serviceURI = req.getRequestURL().toString(); + // Figure out the service end point(s). + final String[] serviceURI = getServiceURIs(req); final VoID v = new VoID(g, tripleStore, serviceURI, aDataSet); Modified: branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/QueryServlet.java =================================================================== --- branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/QueryServlet.java 2014-03-16 22:59:51 UTC (rev 7987) +++ branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/QueryServlet.java 2014-03-16 23:09:34 UTC (rev 7988) @@ -30,6 +30,7 @@ import java.io.StringWriter; import java.io.Writer; import java.util.Iterator; +import java.util.List; import java.util.Map; import java.util.TreeMap; import java.util.UUID; @@ -39,6 +40,7 @@ import java.util.concurrent.TimeoutException; import java.util.concurrent.atomic.AtomicInteger; +import javax.servlet.ServletRegistration; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -255,30 +257,9 @@ return; } - /* - * Figure out the service end point. - * - * Note: This code to figure out the service end point is a hack. It - * tends to work for the special case of ServiceDescription because - * there is an identity between the request URL and the service end - * point in this special case. - */ + // The serviceURIs for this graph. + final String[] serviceURI = BigdataServlet.getServiceURIs(req); - final String serviceURI; - { - - final StringBuffer sb = req.getRequestURL(); - - final int indexOf = sb.indexOf("?"); - - if (indexOf == -1) { - serviceURI = sb.toString(); - } else { - serviceURI = sb.substring(0, indexOf); - } - - } - /* * TODO Resolve the SD class name and ctor via a configuration property * for extensible descriptions. Modified: branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/SD.java =================================================================== --- branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/SD.java 2014-03-16 22:59:51 UTC (rev 7987) +++ branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/SD.java 2014-03-16 23:09:34 UTC (rev 7988) @@ -379,7 +379,7 @@ /** * The service end point (from the constructor). */ - protected final String serviceURI; + protected final String[] serviceURI; /** * The value factory used to create values for the service description graph @@ -415,7 +415,7 @@ * @see #describeService() */ public SD(final Graph g, final AbstractTripleStore tripleStore, - final String serviceURI) { + final String... serviceURI) { if (g == null) throw new IllegalArgumentException(); @@ -426,6 +426,13 @@ if (serviceURI == null) throw new IllegalArgumentException(); + if (serviceURI.length == 0) + throw new IllegalArgumentException(); + + for (String s : serviceURI) + if (s == null) + throw new IllegalArgumentException(); + this.g = g; this.tripleStore = tripleStore; @@ -498,8 +505,12 @@ */ protected void describeServiceEndpoints() { - g.add(aService, SD.endpoint, g.getValueFactory().createURI(serviceURI)); + for (String uri : serviceURI) { + g.add(aService, SD.endpoint, g.getValueFactory().createURI(uri)); + + } + } /** Modified: branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/VoID.java =================================================================== --- branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/VoID.java 2014-03-16 22:59:51 UTC (rev 7987) +++ branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/VoID.java 2014-03-16 23:09:34 UTC (rev 7988) @@ -70,23 +70,23 @@ * The graph in which the service description is accumulated (from the * constructor). */ - protected final Graph g; + private final Graph g; /** * The KB instance that is being described (from the constructor). */ - protected final AbstractTripleStore tripleStore; + private final AbstractTripleStore tripleStore; /** - * The service end point (from the constructor). + * The service end point(s) (from the constructor). */ - protected final String serviceURI; + private final String[] serviceURI; /** * The value factory used to create value... [truncated message content] |
From: <mrp...@us...> - 2014-03-18 18:59:06
|
Revision: 7996 http://sourceforge.net/p/bigdata/code/7996 Author: mrpersonick Date: 2014-03-18 18:59:02 +0000 (Tue, 18 Mar 2014) Log Message: ----------- added support for a JSON to RDF parser. ticket 862 Modified Paths: -------------- branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/ServiceProviderHook.java branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/rio/json/BigdataSPARQLResultsJSONWriter.java branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/rio/json/BigdataSPARQLResultsJSONWriterFactoryForConstruct.java branches/RDR/bigdata-rdf/src/resources/service-providers/META-INF/services/org.openrdf.rio.RDFParserFactory branches/RDR/bigdata-war/src/html/js/workbench.js Added Paths: ----------- branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/rio/json/BigdataSPARQLResultsJSONParser.java branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/rio/json/BigdataSPARQLResultsJSONParserFactory.java branches/RDR/bigdata-sails/lib/jackson-core-2.3.3-20140314.203554-3.jar Modified: branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/ServiceProviderHook.java =================================================================== --- branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/ServiceProviderHook.java 2014-03-18 18:16:29 UTC (rev 7995) +++ branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/ServiceProviderHook.java 2014-03-18 18:59:02 UTC (rev 7996) @@ -38,6 +38,7 @@ import org.openrdf.rio.RDFWriterRegistry; import com.bigdata.rdf.model.StatementEnum; +import com.bigdata.rdf.rio.json.BigdataSPARQLResultsJSONParserFactory; import com.bigdata.rdf.rio.json.BigdataSPARQLResultsJSONWriterFactoryForConstruct; import com.bigdata.rdf.rio.json.BigdataSPARQLResultsJSONWriterFactoryForSelect; import com.bigdata.rdf.rio.ntriples.BigdataNTriplesParserFactory; @@ -118,16 +119,22 @@ r.add(new BigdataNTriplesParserFactory()); - // subclassed the turtle parser to allow for fully numeric bnode ids + // subclassed the turtle parser for RDR r.add(new BigdataTurtleParserFactory()); + /* + * Allows parsing of JSON SPARQL Results with an {s,p,o,[c]} header. + * RDR-enabled. + */ + r.add(new BigdataSPARQLResultsJSONParserFactory()); + } { final TupleQueryResultWriterRegistry r = TupleQueryResultWriterRegistry.getInstance(); - // add our custom RDR-enabled JSON writer + // add our custom RDR-enabled JSON writer (RDR-enabled) r.add(new BigdataSPARQLResultsJSONWriterFactoryForSelect()); } @@ -139,8 +146,10 @@ // r.add(new BigdataRDFXMLWriterFactory()); + // RDR-enabled r.add(new BigdataTurtleWriterFactory()); + // RDR-enabled r.add(new BigdataSPARQLResultsJSONWriterFactoryForConstruct()); } Added: branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/rio/json/BigdataSPARQLResultsJSONParser.java =================================================================== --- branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/rio/json/BigdataSPARQLResultsJSONParser.java (rev 0) +++ branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/rio/json/BigdataSPARQLResultsJSONParser.java 2014-03-18 18:59:02 UTC (rev 7996) @@ -0,0 +1,574 @@ +/** +Copyright (C) SYSTAP, LLC 2006-2014. All rights reserved. + +Contact: + SYSTAP, LLC + 4501 Tower Road + Greensboro, NC 27410 + lic...@bi... + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; version 2 of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +package com.bigdata.rdf.rio.json; + +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.LineNumberReader; +import java.io.Reader; + +import org.apache.log4j.Logger; +import org.openrdf.model.Resource; +import org.openrdf.model.Statement; +import org.openrdf.model.URI; +import org.openrdf.model.Value; +import org.openrdf.model.ValueFactory; +import org.openrdf.rio.RDFFormat; +import org.openrdf.rio.RDFHandlerException; +import org.openrdf.rio.RDFParseException; +import org.openrdf.rio.helpers.RDFParserBase; + +import com.bigdata.rdf.model.BigdataStatement; +import com.bigdata.rdf.model.BigdataValueFactory; +import com.bigdata.rdf.model.BigdataValueFactoryImpl; +import com.fasterxml.jackson.core.JsonFactory; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonToken; + +/** + * RDF parser for JSON SPARQL Results files that have the variables (s, p, o, + * and optionally c) in the header. + */ +public class BigdataSPARQLResultsJSONParser extends RDFParserBase { + + protected static final transient Logger log = + Logger.getLogger(BigdataSPARQLResultsJSONParser.class); + + + private LineNumberReader lineReader; + + private BigdataValueFactory vf; + + /** + * Default ctor uses a BigdataValueFactory with a namespace of "". Used + * for testing. + */ + public BigdataSPARQLResultsJSONParser() { + this(BigdataValueFactoryImpl.getInstance("")); + } + + /** + * Construct a parser with the supplied BigdataValueFactory. + */ + public BigdataSPARQLResultsJSONParser(final BigdataValueFactory vf) { + super(vf); + + this.vf = vf; + } + + /** + * Set the value factory. Must be a BigdataValueFactory because of the + * RDR syntax support. + */ + public void setValueFactory(final ValueFactory vf) { + if (vf instanceof BigdataValueFactory) { + this.vf = (BigdataValueFactory) vf; + } else { + throw new IllegalArgumentException(); + } + } + + /** + * Returns {@link BigdataSPARQLResultsJSONParserFactory#JSON}. + */ + @Override + public RDFFormat getRDFFormat() { + + return BigdataSPARQLResultsJSONParserFactory.JSON; + + } + + /** + * Parse the supplied input stream into RDF. + */ + @Override + public void parse(final InputStream is, final String baseURI) throws IOException, + RDFParseException, RDFHandlerException { + + parse(new InputStreamReader(is), baseURI); + + } + + /** + * Parse the supplied reader into RDF. + */ + @Override + public void parse(final Reader r, final String baseURI) throws IOException, + RDFParseException, RDFHandlerException { + + lineReader = new LineNumberReader(r); + // Start counting lines at 1: + lineReader.setLineNumber(1); + + // read graph from JSON in request + + final JsonFactory factory = new JsonFactory(); + + final JsonParser parser = factory.createJsonParser(lineReader); + +// final JsonParser parser = Json.createParser(lineReader); + + JsonToken event = parser.nextToken(); + + if (event != JsonToken.START_OBJECT) { + reportFatalError("unexpected parse event: " + event); + } + + event = parser.nextToken(); + + if (event != JsonToken.FIELD_NAME && !(parser.getCurrentName().equals("head"))) { + reportFatalError("unexpected parse event: " + event); + } + + event = parser.nextToken(); + + if (event != JsonToken.START_OBJECT) { + reportFatalError("unexpected parse event: " + event); + } + + event = parser.nextToken(); + + if (event != JsonToken.FIELD_NAME && !(parser.getCurrentName().equals("vars"))) { + reportFatalError("unexpected parse event: " + event); + } + + event = parser.nextToken(); + + if (event != JsonToken.START_ARRAY) { + reportFatalError("unexpected parse event: " + event); + } + + event = parser.nextToken(); + + if (event != JsonToken.VALUE_STRING && !(parser.getCurrentName().equals("s"))) { + reportFatalError("unexpected parse event: " + event); + } + + event = parser.nextToken(); + + if (event != JsonToken.VALUE_STRING && !(parser.getCurrentName().equals("p"))) { + reportFatalError("unexpected parse event: " + event); + } + + event = parser.nextToken(); + + if (event != JsonToken.VALUE_STRING && !(parser.getCurrentName().equals("o"))) { + reportFatalError("unexpected parse event: " + event); + } + + event = parser.nextToken(); + + if (event == JsonToken.VALUE_STRING) { + + if (!(parser.getCurrentName().equals("c"))) { + reportFatalError("unexpected parse event: " + event); + } + + event = parser.nextToken(); + + } + + if (event != JsonToken.END_ARRAY) { + reportFatalError("unexpected parse event: " + event); + } + + event = parser.nextToken(); + + if (event != JsonToken.END_OBJECT) { + reportFatalError("unexpected parse event: " + event); + } + + event = parser.nextToken(); + + if (event != JsonToken.FIELD_NAME && !(parser.getCurrentName().equals("results"))) { + reportFatalError("unexpected parse event: " + event); + } + + event = parser.nextToken(); + + if (event != JsonToken.START_OBJECT) { + reportFatalError("unexpected parse event: " + event); + } + + event = parser.nextToken(); + + if (event != JsonToken.FIELD_NAME && !(parser.getCurrentName().equals("bindings"))) { + reportFatalError("unexpected parse event: " + event); + } + + event = parser.nextToken(); + + if (event != JsonToken.START_ARRAY) { + reportFatalError("unexpected parse event: " + event); + } + + +// boolean startingBindings = false; +// boolean breakLoop = false; +// +// while (parser.hasNext()) { +// JsonToken event = parser.nextToken(); +// switch (event) { +// case START_ARRAY: +// if (startingBindings) +// breakLoop = true; +// case END_ARRAY: +// case START_OBJECT: +// case END_OBJECT: +// case VALUE_FALSE: +// case VALUE_NULL: +// case VALUE_TRUE: +// System.err.println(event.toString()); +// break; +// case KEY_NAME: +// if (parser.getString().equals("bindings")) +// startingBindings = true; +// System.err.println(event.toString() + " " +// + parser.getString()); +// break; +// case VALUE_STRING: +// case VALUE_NUMBER: +// System.err.println(event.toString() + " " +// + parser.getString()); +// break; +// } +// if (breakLoop) +// break; +// } + + rdfHandler.startRDF(); + + Statement stmt; + while ((stmt = parseStatement(parser)) != null) { + + if (log.isDebugEnabled()) + log.debug(stmt); + + rdfHandler.handleStatement(stmt); + + } + + rdfHandler.endRDF(); + + } + + /** + * Parse a statement from the JSON stream. + */ + private final BigdataStatement parseStatement( + final JsonParser parser) + throws RDFParseException, JsonParseException, IOException { + + JsonToken event = parser.nextToken(); + + if (event == null || event == JsonToken.END_ARRAY) { + + return null; + + } + + if (event != JsonToken.START_OBJECT) { + reportFatalError("unexpected parse event: " + event); + } + + event = parser.nextToken(); + + if (event != JsonToken.FIELD_NAME && !(parser.getCurrentName().equals("s"))) { + reportFatalError("unexpected parse event: " + event); + } + + final Resource s = (Resource) parseValue(parser); + + event = parser.nextToken(); + + if (event != JsonToken.FIELD_NAME && !(parser.getCurrentName().equals("p"))) { + reportFatalError("unexpected parse event: " + event); + } + + final URI p = (URI) parseValue(parser); + + event = parser.nextToken(); + + if (event != JsonToken.FIELD_NAME && !(parser.getCurrentName().equals("o"))) { + reportFatalError("unexpected parse event: " + event); + } + + final Value o = parseValue(parser); + + event = parser.nextToken(); + + switch (event) { + case END_OBJECT: + return vf.createStatement(s, p, o); + case FIELD_NAME: + if (!(parser.getCurrentName().equals("c"))) { + reportFatalError("unexpected parse event: " + event); + } + final Resource c = (Resource) parseValue(parser); + event = parser.nextToken(); + if (event != JsonToken.END_OBJECT) { + reportFatalError("unexpected parse event: " + event); + } + return vf.createStatement(s, p, o, c); + default: + reportFatalError("unexpected parse event: " + event); + } + + // unreachable code + return null; + + } + + /** + * Parse a value from the JSON stream. + */ + protected Value parseValue(final JsonParser parser) + throws RDFParseException, JsonParseException, IOException { + + JsonToken event = parser.nextToken(); + + if (event != JsonToken.START_OBJECT) { + reportFatalError("unexpected parse event: " + event); + } + + event = parser.nextToken(); + + if (event != JsonToken.FIELD_NAME && !parser.getCurrentName().equals("type")) { + reportFatalError("unexpected parse event: " + event); + } + + event = parser.nextToken(); + + if (event != JsonToken.VALUE_STRING) { + reportFatalError("unexpected parse event: " + event); + } + + final String type = parser.getText(); + + Value val = null; + + if ("sid".equals(type)) { + + val = parseSid(parser); + + } else if ("uri".equals(type)) { + + val = parseURI(parser); + + } else if ("bnode".equals(type)) { + + val = parseBNode(parser); + + } else if ("literal".equals(type)) { + + val = parseLiteral(parser); + + } else if ("typed-literal".equals(type)) { + + val = parseTypedLiteral(parser); + + } else { + + reportFatalError("unexpected parse event: " + event); + + } + + event = parser.nextToken(); + + if (event != JsonToken.END_OBJECT) { + reportFatalError("unexpected parse event: " + event); + } + + return val; + + } + + /** + * Parse a sid from the JSON stream. + */ + protected Value parseSid(final JsonParser parser) + throws RDFParseException, JsonParseException, IOException { + + JsonToken event = parser.nextToken(); + + if (event != JsonToken.FIELD_NAME && !parser.getCurrentName().equals("value")) { + reportFatalError("unexpected parse event: " + event); + } + + final BigdataStatement stmt = parseStatement(parser); + + return vf.createBNode(stmt); + + } + + /** + * Parse a URI from the JSON stream. + */ + protected Value parseURI(final JsonParser parser) + throws RDFParseException, JsonParseException, IOException { + + JsonToken event = parser.nextToken(); + + if (event != JsonToken.FIELD_NAME && !parser.getCurrentName().equals("value")) { + reportFatalError("unexpected parse event: " + event); + } + + event = parser.nextToken(); + + if (event != JsonToken.VALUE_STRING) { + reportFatalError("unexpected parse event: " + event); + } + + return vf.createURI(parser.getText()); + + } + + /** + * Parse a bnode from the JSON stream. + */ + protected Value parseBNode(final JsonParser parser) + throws RDFParseException, JsonParseException, IOException { + + JsonToken event = parser.nextToken(); + + if (event != JsonToken.FIELD_NAME && !parser.getCurrentName().equals("value")) { + reportFatalError("unexpected parse event: " + event); + } + + event = parser.nextToken(); + + if (event != JsonToken.VALUE_STRING) { + reportFatalError("unexpected parse event: " + event); + } + + return vf.createBNode(parser.getText()); + + } + + /** + * Parse a plain literal or language-tagged literal from the JSON stream. + */ + protected Value parseLiteral(final JsonParser parser) + throws RDFParseException, JsonParseException, IOException { + + JsonToken event = parser.nextToken(); + + if (event != JsonToken.FIELD_NAME) + reportFatalError("unexpected parse event: " + event); + + if (parser.getCurrentName().equals("xml:lang")) { + + event = parser.nextToken(); + + if (event != JsonToken.VALUE_STRING) { + reportFatalError("unexpected parse event: " + event); + } + + final String lang = parser.getText(); + + event = parser.nextToken(); + + if (event != JsonToken.FIELD_NAME && !parser.getCurrentName().equals("value")) { + reportFatalError("unexpected parse event: " + event); + } + + event = parser.nextToken(); + + if (event != JsonToken.VALUE_STRING) { + reportFatalError("unexpected parse event: " + event); + } + + return vf.createLiteral(parser.getText(), lang); + + } else if (parser.getCurrentName().equals("value")) { + + event = parser.nextToken(); + + if (event != JsonToken.VALUE_STRING) { + reportFatalError("unexpected parse event: " + event); + } + + return vf.createLiteral(parser.getText()); + + } else { + + reportFatalError("unexpected parse event: " + event); + + // unreachable code + return null; + + } + + } + + /** + * Parse a typed literal from the JSON stream. + */ + protected Value parseTypedLiteral(final JsonParser parser) + throws RDFParseException, JsonParseException, IOException { + + JsonToken event = parser.nextToken(); + + if (event != JsonToken.FIELD_NAME && !parser.getCurrentName().equals("datatype")) { + reportFatalError("unexpected parse event: " + event); + } + + event = parser.nextToken(); + + if (event != JsonToken.VALUE_STRING) { + reportFatalError("unexpected parse event: " + event); + } + + final URI datatype = vf.createURI(parser.getText()); + + event = parser.nextToken(); + + if (event != JsonToken.FIELD_NAME && !parser.getCurrentName().equals("value")) { + reportFatalError("unexpected parse event: " + event); + } + + event = parser.nextToken(); + + if (event != JsonToken.VALUE_STRING) { + reportFatalError("unexpected parse event: " + event); + } + + return vf.createLiteral(parser.getText(), datatype); + + } + + /** + * Overrides {@link RDFParserBase#reportFatalError(String)}, adding line + * number information to the error. + */ + @Override + protected void reportFatalError(String msg) throws RDFParseException { + + reportFatalError(msg, lineReader.getLineNumber(), -1); + + } + + +} Property changes on: branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/rio/json/BigdataSPARQLResultsJSONParser.java ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/rio/json/BigdataSPARQLResultsJSONParserFactory.java =================================================================== --- branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/rio/json/BigdataSPARQLResultsJSONParserFactory.java (rev 0) +++ branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/rio/json/BigdataSPARQLResultsJSONParserFactory.java 2014-03-18 18:59:02 UTC (rev 7996) @@ -0,0 +1,68 @@ +/** +Copyright (C) SYSTAP, LLC 2006-2014. All rights reserved. + +Contact: + SYSTAP, LLC + 4501 Tower Road + Greensboro, NC 27410 + lic...@bi... + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; version 2 of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +package com.bigdata.rdf.rio.json; + +import java.nio.charset.Charset; + +import org.openrdf.rio.RDFFormat; +import org.openrdf.rio.RDFParser; +import org.openrdf.rio.RDFParserFactory; +import org.openrdf.rio.turtle.TurtleParser; + +/** + * An {@link RDFParserFactory} for Turtle parsers. + * + * @author Arjohn Kampman + * @openrdf + */ +public class BigdataSPARQLResultsJSONParserFactory implements RDFParserFactory { + + public static final RDFFormat JSON = new RDFFormat( + "JSON", // name + "application/sparql-results+json", // mime-type + Charset.forName("UTF-8"), // charset + "json", // file extension + false, // supports namespaces + true // supports contexts + ); + + static { + + RDFFormat.register(JSON); + + } + + /** + * Returns {@link RDFFormat#TURTLE}. + */ + public RDFFormat getRDFFormat() { + return JSON; + } + + /** + * Returns a new instance of {@link TurtleParser}. + */ + public RDFParser getParser() { + return new BigdataSPARQLResultsJSONParser(); + } +} Property changes on: branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/rio/json/BigdataSPARQLResultsJSONParserFactory.java ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Modified: branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/rio/json/BigdataSPARQLResultsJSONWriter.java =================================================================== --- branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/rio/json/BigdataSPARQLResultsJSONWriter.java 2014-03-18 18:16:29 UTC (rev 7995) +++ branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/rio/json/BigdataSPARQLResultsJSONWriter.java 2014-03-18 18:59:02 UTC (rev 7996) @@ -107,15 +107,15 @@ writer.write(", "); writeKey("value"); openBraces(); - writeKeyValue("sid-s", stmt.getSubject()); + writeKeyValue("s", stmt.getSubject()); writeComma(); - writeKeyValue("sid-p", stmt.getPredicate()); + writeKeyValue("p", stmt.getPredicate()); writeComma(); - writeKeyValue("sid-o", stmt.getObject()); + writeKeyValue("o", stmt.getObject()); if (stmt.getContext() != null) { writeComma(); - writeKeyValue("sid-c", stmt.getContext()); + writeKeyValue("c", stmt.getContext()); } closeBraces(); @@ -469,7 +469,7 @@ @Override public RDFFormat getRDFFormat() { - return BigdataSPARQLResultsJSONWriterFactoryForConstruct.JSON; + return BigdataSPARQLResultsJSONParserFactory.JSON; } } Modified: branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/rio/json/BigdataSPARQLResultsJSONWriterFactoryForConstruct.java =================================================================== --- branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/rio/json/BigdataSPARQLResultsJSONWriterFactoryForConstruct.java 2014-03-18 18:16:29 UTC (rev 7995) +++ branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/rio/json/BigdataSPARQLResultsJSONWriterFactoryForConstruct.java 2014-03-18 18:59:02 UTC (rev 7996) @@ -7,7 +7,6 @@ import java.io.OutputStream; import java.io.Writer; -import java.nio.charset.Charset; import org.openrdf.query.resultio.TupleQueryResultFormat; import org.openrdf.query.resultio.TupleQueryResultWriterFactory; @@ -23,26 +22,11 @@ */ public class BigdataSPARQLResultsJSONWriterFactoryForConstruct implements RDFWriterFactory { - public static final RDFFormat JSON = new RDFFormat( - "JSON", // name - "application/sparql-results+json", // mime-type - Charset.forName("UTF-8"), // charset - "json", // file extension - false, // supports namespaces - true // supports contexts - ); - - static { - - RDFFormat.register(JSON); - - } - /** * Returns {@link TupleQueryResultFormat#JSON}. */ public RDFFormat getRDFFormat() { - return JSON; + return BigdataSPARQLResultsJSONParserFactory.JSON; } /** Modified: branches/RDR/bigdata-rdf/src/resources/service-providers/META-INF/services/org.openrdf.rio.RDFParserFactory =================================================================== --- branches/RDR/bigdata-rdf/src/resources/service-providers/META-INF/services/org.openrdf.rio.RDFParserFactory 2014-03-18 18:16:29 UTC (rev 7995) +++ branches/RDR/bigdata-rdf/src/resources/service-providers/META-INF/services/org.openrdf.rio.RDFParserFactory 2014-03-18 18:59:02 UTC (rev 7996) @@ -1,3 +1,4 @@ com.bigdata.rdf.rio.nquads.NQuadsParserFactory com.bigdata.rdf.rio.ntriples.BigdataNTriplesParserFactory com.bigdata.rdf.rio.turtle.BigdataTurtleParserFactory +com.bigdata.rdf.rio.json.BigdataSPARQLResultsJSONParserFactory \ No newline at end of file Added: branches/RDR/bigdata-sails/lib/jackson-core-2.3.3-20140314.203554-3.jar =================================================================== (Binary files differ) Index: branches/RDR/bigdata-sails/lib/jackson-core-2.3.3-20140314.203554-3.jar =================================================================== --- branches/RDR/bigdata-sails/lib/jackson-core-2.3.3-20140314.203554-3.jar 2014-03-18 18:16:29 UTC (rev 7995) +++ branches/RDR/bigdata-sails/lib/jackson-core-2.3.3-20140314.203554-3.jar 2014-03-18 18:59:02 UTC (rev 7996) Property changes on: branches/RDR/bigdata-sails/lib/jackson-core-2.3.3-20140314.203554-3.jar ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Modified: branches/RDR/bigdata-war/src/html/js/workbench.js =================================================================== --- branches/RDR/bigdata-war/src/html/js/workbench.js 2014-03-18 18:16:29 UTC (rev 7995) +++ branches/RDR/bigdata-war/src/html/js/workbench.js 2014-03-18 18:59:02 UTC (rev 7996) @@ -867,7 +867,7 @@ /* Utility functions */ function getSID(binding) { - return '<< <' + binding.value['sid-s'].value + '>\n<' + binding.value['sid-p'].value + '>\n<' + binding.value['sid-o'].value + '> >>'; + return '<<\n <' + binding.value['s'].value + '>,\n<' + binding.value['p'].value + '>,\n <' + binding.value['o'].value + '>\n>>'; } function parseSID(sid) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tho...@us...> - 2014-03-23 17:47:02
|
Revision: 8011 http://sourceforge.net/p/bigdata/code/8011 Author: thompsonbry Date: 2014-03-23 17:46:59 +0000 (Sun, 23 Mar 2014) Log Message: ----------- Added AbstractTripleStore::getStatements(IChunkedOrderedIterator<BigdataTriplePattern> triplePatterns) returning BigdataStatementIterator as partial fix to #866 (parallel streaming resolution of triple patterns to ground statements). This commit includes unit tests of the new feature in TestTripleStore. Hand off to MikeP for the rest of that ticket. Modified Paths: -------------- branches/RDR/bigdata/src/java/com/bigdata/striterator/AbstractChunkedResolverator.java branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/store/AbstractTripleStore.java branches/RDR/bigdata-rdf/src/test/com/bigdata/rdf/store/TestTripleStore.java Added Paths: ----------- branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/store/BigdataTriplePattern.java branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/store/BigdataTriplePatternMaterializer.java Modified: branches/RDR/bigdata/src/java/com/bigdata/striterator/AbstractChunkedResolverator.java =================================================================== --- branches/RDR/bigdata/src/java/com/bigdata/striterator/AbstractChunkedResolverator.java 2014-03-23 16:10:08 UTC (rev 8010) +++ branches/RDR/bigdata/src/java/com/bigdata/striterator/AbstractChunkedResolverator.java 2014-03-23 17:46:59 UTC (rev 8011) @@ -260,7 +260,15 @@ throw new RuntimeException(t); } - assert converted.length == chunk.length; + /** + * Note: This is no longer true. Some conversions can now + * expand or reduce the size of the chunk. + * + * @see <a href="http://trac.bigdata.com/ticket/866" > + * Efficient batch remove of a collection of triple + * patterns </a> + */ +// assert converted.length == chunk.length; // Note: Throws BufferClosedException if closed. buffer.add(converted); Modified: branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/store/AbstractTripleStore.java =================================================================== --- branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/store/AbstractTripleStore.java 2014-03-23 16:10:08 UTC (rev 8010) +++ branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/store/AbstractTripleStore.java 2014-03-23 17:46:59 UTC (rev 8011) @@ -165,6 +165,7 @@ import com.bigdata.sparse.GlobalRowStoreUtil; import com.bigdata.striterator.ChunkedArrayIterator; import com.bigdata.striterator.ChunkedConvertingIterator; +import com.bigdata.striterator.ChunkedWrappedIterator; import com.bigdata.striterator.DelegateChunkedIterator; import com.bigdata.striterator.EmptyChunkedIterator; import com.bigdata.striterator.IChunkedIterator; @@ -2706,7 +2707,35 @@ return asStatementIterator(getAccessPath(s, p, o, c).iterator()); } + + /** + * Efficient batched, streaming resolution of triple patterns to statements + * spanned by those triple patterns that are present in the data. + * <p> + * Note: If the input contains triple patterns that have a high cardinality + * in the data, then a large number of statements may be returned. + * + * @param triplePatterns + * A collection of triple patterns or fully bound statements. If + * this collection contains triple patterns that have a high + * cardinality in the data, then a large number of statements may + * be returned. + * + * @return An iterator from which the materialized statements spanned by + * those triple patterns may be read. + * + * @see <a href="http://trac.bigdata.com/ticket/866" > Efficient batch + * remove of a collection of triple patterns </a> + */ + public BigdataStatementIterator getStatements( + final IChunkedOrderedIterator<BigdataTriplePattern> triplePatterns) { + return asStatementIterator(new ChunkedWrappedIterator<ISPO>( + new BigdataTriplePatternMaterializer(this, triplePatterns) + .start(getExecutorService()))); + + } + final public BigdataValue asValue(final Value value) { return getValueFactory().asValue(value); Added: branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/store/BigdataTriplePattern.java =================================================================== --- branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/store/BigdataTriplePattern.java (rev 0) +++ branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/store/BigdataTriplePattern.java 2014-03-23 17:46:59 UTC (rev 8011) @@ -0,0 +1,91 @@ +/* + +Copyright (C) SYSTAP, LLC 2006-2014. All rights reserved. + +Contact: + SYSTAP, LLC + 4501 Tower Road + Greensboro, NC 27410 + lic...@bi... + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; version 2 of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +*/ +package com.bigdata.rdf.store; + +import com.bigdata.rdf.model.BigdataResource; +import com.bigdata.rdf.model.BigdataURI; +import com.bigdata.rdf.model.BigdataValue; + +/** + * A simple class that represents a triple (or quad) pattern. + * + * @see <a href="http://trac.bigdata.com/ticket/866" > Efficient batch remove of + * a collection of triple patterns </a> + */ +public class BigdataTriplePattern { + +// private static final long serialVersionUID = 1L; + + private final BigdataResource s; + private final BigdataURI p; + private final BigdataValue o; + private final BigdataResource c; + + public BigdataTriplePattern(final BigdataResource subject, + final BigdataURI predicate, final BigdataValue object) { + + this(subject, predicate, object, (BigdataResource) null); + + } + + public BigdataTriplePattern(final BigdataResource subject, + final BigdataURI predicate, final BigdataValue object, + final BigdataResource context) { + + this.s = subject; + + this.p = predicate; + + this.o = object; + + this.c = context; + + } + + final public BigdataResource getSubject() { + + return s; + + } + + final public BigdataURI getPredicate() { + + return p; + + } + + final public BigdataValue getObject() { + + return o; + + } + + final public BigdataResource getContext() { + + return c; + + } + +} Added: branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/store/BigdataTriplePatternMaterializer.java =================================================================== --- branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/store/BigdataTriplePatternMaterializer.java (rev 0) +++ branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/store/BigdataTriplePatternMaterializer.java 2014-03-23 17:46:59 UTC (rev 8011) @@ -0,0 +1,289 @@ +/* + +Copyright (C) SYSTAP, LLC 2006-2014. All rights reserved. + +Contact: + SYSTAP, LLC + 4501 Tower Road + Greensboro, NC 27410 + lic...@bi... + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; version 2 of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +*/ +package com.bigdata.rdf.store; + +import java.util.Arrays; +import java.util.LinkedList; +import java.util.List; +import java.util.concurrent.ArrayBlockingQueue; +import java.util.concurrent.BlockingQueue; +import java.util.concurrent.Callable; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.FutureTask; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicReference; + +import org.apache.system.SystemUtil; + +import com.bigdata.rdf.spo.ISPO; +import com.bigdata.rdf.spo.SPOAccessPath; +import com.bigdata.relation.accesspath.BlockingBuffer; +import com.bigdata.striterator.AbstractChunkedResolverator; +import com.bigdata.striterator.IChunkedOrderedIterator; +import com.bigdata.util.concurrent.LatchedExecutor; + +import cutthecrap.utils.striterators.ICloseableIterator; + +/** + * Efficient batched, streaming resolution of triple patterns to statements + * spanned by those triple patterns that are present in the data. + * <p> + * Note: If the input contains triple patterns that have a high cardinality + * in the data, then a large number of statements may be returned. + * + * @param triplePatterns + * A collection of triple patterns or fully bound statements. If + * this collection contains triple patterns that have a high + * cardinality in the data, then a large number of statements may + * be returned. + * + * @return An iterator from which the materialized statements spanned by + * those triple patterns may be read. + * + * @see <a href="http://trac.bigdata.com/ticket/866" > Efficient batch + * remove of a collection of triple patterns </a> + */ +public class BigdataTriplePatternMaterializer + extends + AbstractChunkedResolverator<BigdataTriplePattern, ISPO, AbstractTripleStore> + implements ICloseableIterator<ISPO> { +// implements IChunkedOrderedIterator<ISPO> { + + private final int nthreads; + + public BigdataTriplePatternMaterializer(final AbstractTripleStore db, + final IChunkedOrderedIterator<BigdataTriplePattern> src) { + this(db, src, 4/* nthreads */); + } + + public BigdataTriplePatternMaterializer(final AbstractTripleStore db, + final IChunkedOrderedIterator<BigdataTriplePattern> src, + final int nthreads) { + + super(db, src, new BlockingBuffer<ISPO[]>( + db.getChunkOfChunksCapacity(), + db.getChunkCapacity(), + db.getChunkTimeout(), + TimeUnit.MILLISECONDS)); + + if (nthreads < 0) + throw new IllegalArgumentException(); + + // At least 1 thread. At most ncpus*2. + this.nthreads = Math.max( + Math.min(nthreads, SystemUtil.numProcessors() * 2), 1); + + } + + @Override + public BigdataTriplePatternMaterializer start(final ExecutorService service) { + + helperService.set(new LatchedExecutor(service, nthreads)); + + super.start(service); + + return this; + + } + private final AtomicReference<LatchedExecutor> helperService = new AtomicReference<LatchedExecutor>(); + + @Override + protected ISPO[] resolveChunk(final BigdataTriplePattern[] chunk) { + + final LatchedExecutor helperService = this.helperService.get(); + + if (helperService == null) + throw new IllegalStateException(); + + /* + * The output will be at most sizeof(chunk) arrays. Each array will have + * one or more statements. Any triple patterns that have no intersection + * in the data will be dropped and will not put anything into this + * output queue. + */ + final BlockingQueue<ISPO[]> out = new ArrayBlockingQueue<ISPO[]>( + chunk.length); + + final List<FutureTask<Long>> tasks = new LinkedList<FutureTask<Long>>(); + + try { + + final CountDownLatch latch = new CountDownLatch(chunk.length); + + /* + * Create FutureTasks for each subquery. The futures are not + * submitted to the Executor yet. That happens in call(). By + * deferring the evaluation until call() we gain the ability to + * cancel all subqueries if any subquery fails. + */ + for (BigdataTriplePattern stmt : chunk) { + + /* + * Task runs subquery and cancels all subqueries in [tasks] if + * it fails. + */ + final FutureTask<Long> ft = new FutureTask<Long>( + new ResolveTriplePatternTask(stmt, out)) { + /* + * Hook future to count down the latch when the task is + * done. + */ + public void run() { + try { + super.run(); + } finally { + latch.countDown(); + } + } + }; + + tasks.add(ft); + + } + + /* + * Run triple pattern resolution with limited parallelism. + */ + for (FutureTask<Long> ft : tasks) { + helperService.execute(ft); + } + + /* + * Wait for all tasks to complete. + */ + latch.await(); + + /* + * Check futures, counting the #of solutions. + */ + long nfound = 0L; + for (FutureTask<Long> ft : tasks) { + nfound += ft.get(); + if (nfound > Integer.MAX_VALUE) + throw new UnsupportedOperationException(); + } + + /* + * Convert into a single ISPO[] chunk. + */ + final ISPO[] dest = new ISPO[(int) nfound]; + int destPos = 0; + ISPO[] src = null; + while ((src = out.poll()) != null) { + System.arraycopy(src/* src */, 0/* srcPos */, dest, destPos, + src.length); + destPos += src.length; + } + + return dest; + + } catch (InterruptedException e) { + throw new RuntimeException(e); + } catch (ExecutionException e) { + throw new RuntimeException(e); + } finally { + + // Cancel any tasks which are still running. + for (FutureTask<Long> ft : tasks) + ft.cancel(true/* mayInterruptIfRunning */); + + } + + } + + /** + * Resolve a triple pattern to the statements that it spans in the data. + * + * @author <a href="mailto:tho...@us...">Bryan + * Thompson</a> + */ + private class ResolveTriplePatternTask implements Callable<Long> { + + private final BigdataTriplePattern stmt; + private final BlockingQueue<ISPO[]> out; + + public ResolveTriplePatternTask(final BigdataTriplePattern stmt, + final BlockingQueue<ISPO[]> out) { + this.stmt = stmt; + this.out = out; + } + + @Override + public Long call() throws Exception { + /* + * TODO What about closure over the SIDs? + * + * final IChunkedOrderedIterator<ISPO> itr = + * database.computeClosureForStatementIdentifiers( + * database.getAccessPath(s, p, o, c).iterator()); + */ + final SPOAccessPath ap = (SPOAccessPath) state.getAccessPath(stmt.getSubject(), + stmt.getPredicate(), stmt.getObject(), stmt.getContext()); + +// if(ap.isFullyBoundForKey()) { +// /* +// * Optimize when triple pattern is a fully bound statement. +// * In this case, the output is either that statement (with IVs +// * resolved) or the triple pattern is dropped. +// */ +// final IChunkedOrderedIterator<ISPO> itr = ap.iterator(); +// try { +// if (!itr.hasNext()) +// return 0L; +// final ISPO spo = itr.next(); +// out.add(new ISPO[]{spo}); +// return 1L; +// } finally { +// itr.close(); +// } +// } else { + long n = 0L; + final IChunkedOrderedIterator<ISPO> itr = ap.iterator(); + try { + while (itr.hasNext()) { + final ISPO[] a = itr.nextChunk(); +// if (true) { +// // verify no null array elements. +// for (int i = 0; i < a.length; i++) { +// if (a[i] == null) +// throw new AssertionError(Arrays.toString(a)); +// } +// } + out.add(a); + n += a.length; + } + return n; + } finally { + itr.close(); + } +// } + + } + + } + +} Modified: branches/RDR/bigdata-rdf/src/test/com/bigdata/rdf/store/TestTripleStore.java =================================================================== --- branches/RDR/bigdata-rdf/src/test/com/bigdata/rdf/store/TestTripleStore.java 2014-03-23 16:10:08 UTC (rev 8010) +++ branches/RDR/bigdata-rdf/src/test/com/bigdata/rdf/store/TestTripleStore.java 2014-03-23 17:46:59 UTC (rev 8011) @@ -46,11 +46,14 @@ import org.openrdf.model.vocabulary.RDF; import org.openrdf.model.vocabulary.RDFS; import org.openrdf.model.vocabulary.XMLSchema; +import org.openrdf.query.parser.sparql.FOAF; import com.bigdata.rdf.axioms.NoAxioms; import com.bigdata.rdf.internal.IV; import com.bigdata.rdf.lexicon.DumpLexicon; +import com.bigdata.rdf.lexicon.Id2TermWriteProc; import com.bigdata.rdf.lexicon.LexiconRelation; +import com.bigdata.rdf.lexicon.Term2IdWriteProc; import com.bigdata.rdf.model.BigdataBNode; import com.bigdata.rdf.model.BigdataLiteral; import com.bigdata.rdf.model.BigdataURI; @@ -1453,6 +1456,137 @@ } + /** + * Unit test of the batched parallel resolution of triple patterns. + * + * @see <a href="http://trac.bigdata.com/ticket/866" > Efficient batch + * remove of a collection of triple patterns </a> + */ + public void test_getStatementsUsingTriplePatterns() { + + final Properties properties = super.getProperties(); + + // override the default axiom model. + properties.setProperty( + com.bigdata.rdf.store.AbstractTripleStore.Options.AXIOMS_CLASS, + NoAxioms.class.getName()); + + final AbstractTripleStore store = getStore(properties); + + try { + + // verify nothing in the store. + assertSameIterator(new Statement[] {}, store.getAccessPath(NULL, + NULL, NULL).iterator()); + + final BigdataValueFactory f = store.getValueFactory(); + + final BigdataURI A = f.createURI("http://www.bigdata.com/A"); + final BigdataURI B = f.createURI("http://www.bigdata.com/B"); + final BigdataURI C = f.createURI("http://www.bigdata.com/C"); + final BigdataURI Person = f.asValue(FOAF.PERSON); + final BigdataURI rdfType = f.asValue(RDF.TYPE); + final BigdataURI foafKnows = f.asValue(FOAF.KNOWS); + + { + + final IStatementBuffer<Statement> buffer = new StatementBuffer<Statement>( + store, 100); + + buffer.add(A, rdfType, Person); + buffer.add(B, rdfType, Person); + buffer.add(C, rdfType, Person); + + buffer.add(A, foafKnows, B); + buffer.add(B, foafKnows, A); + buffer.add(B, foafKnows, C); + buffer.add(C, foafKnows, B); + + buffer.flush(); + + } + + // Empty input. + { + final BigdataTriplePattern[] triplePatterns = new BigdataTriplePattern[] {}; + assertSameStatements( + new Statement[] {// + },// + store.getStatements(new ChunkedArrayIterator<BigdataTriplePattern>( + triplePatterns))); + } + + // Single pattern matching one statement. + { + final BigdataTriplePattern[] triplePatterns = new BigdataTriplePattern[] {// + new BigdataTriplePattern(A, rdfType, null),// + }; + assertSameStatements( + new Statement[] {// + new StatementImpl(A, rdfType, Person),// + },// + store.getStatements(new ChunkedArrayIterator<BigdataTriplePattern>( + triplePatterns))); + } + + // Single pattern matching three statements. + { + final BigdataTriplePattern[] triplePatterns = new BigdataTriplePattern[] {// + new BigdataTriplePattern(null, rdfType, Person),// + }; + assertSameStatements( + new Statement[] {// + new StatementImpl(A, rdfType, Person),// + new StatementImpl(B, rdfType, Person),// + new StatementImpl(C, rdfType, Person),// + },// + store.getStatements(new ChunkedArrayIterator<BigdataTriplePattern>( + triplePatterns))); + } + + // Two patterns matching various statements. + { + final BigdataTriplePattern[] triplePatterns = new BigdataTriplePattern[] {// + new BigdataTriplePattern(A, foafKnows, null),// + new BigdataTriplePattern(null, rdfType, Person),// + }; + assertSameIteratorAnyOrder( + new Statement[] {// + new StatementImpl(A, foafKnows, B),// + new StatementImpl(A, rdfType, Person),// + new StatementImpl(B, rdfType, Person),// + new StatementImpl(C, rdfType, Person),// + },// + store.getStatements(new ChunkedArrayIterator<BigdataTriplePattern>( + triplePatterns))); + } + + // Three patterns, two of which match various statements. + { + final BigdataTriplePattern[] triplePatterns = new BigdataTriplePattern[] {// + new BigdataTriplePattern(A, foafKnows, null),// + new BigdataTriplePattern(null, rdfType, Person),// + new BigdataTriplePattern(rdfType, foafKnows, null),// no match + }; + assertSameIteratorAnyOrder( + new Statement[] {// + new StatementImpl(A, foafKnows, B),// + new StatementImpl(A, rdfType, Person),// + new StatementImpl(B, rdfType, Person),// + new StatementImpl(C, rdfType, Person),// + },// + store.getStatements(new ChunkedArrayIterator<BigdataTriplePattern>( + triplePatterns))); + } + + } finally { + + store.__tearDownUnitTest(); + + } + + } + private String getVeryLargeURI() { final int len = 1024000; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mrp...@us...> - 2014-03-23 22:45:17
|
Revision: 8012 http://sourceforge.net/p/bigdata/code/8012 Author: mrpersonick Date: 2014-03-23 22:45:13 +0000 (Sun, 23 Mar 2014) Log Message: ----------- expose a bulk remove(ISPO) method on the sail Modified Paths: -------------- branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/changesets/StatementWriter.java branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/internal/impl/uri/IPAddrIV.java branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataSail.java Modified: branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/changesets/StatementWriter.java =================================================================== --- branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/changesets/StatementWriter.java 2014-03-23 17:46:59 UTC (rev 8011) +++ branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/changesets/StatementWriter.java 2014-03-23 22:45:13 UTC (rev 8012) @@ -144,7 +144,7 @@ } - private static long removeStatements(final AbstractTripleStore database, + public static long removeStatements(final AbstractTripleStore database, final ISPO[] stmts, final int numStmts, final boolean computeClosureForStatementIdentifiers, Modified: branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/internal/impl/uri/IPAddrIV.java =================================================================== --- branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/internal/impl/uri/IPAddrIV.java 2014-03-23 17:46:59 UTC (rev 8011) +++ branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/internal/impl/uri/IPAddrIV.java 2014-03-23 22:45:13 UTC (rev 8012) @@ -80,11 +80,6 @@ */ private transient String hostAddress; -// /** -// * The IPv4 prefix byte. -// */ -// private transient byte prefix; - /** * The cached byte[] key for the encoding of this IV. */ @@ -128,8 +123,6 @@ this.value = value; -// this.prefix = prefix; - } /* @@ -180,8 +173,6 @@ this.value = Inet4Address.textToAddr(s); -// this.prefix = suffix != null ? Byte.valueOf(suffix) : (byte) 33; - } else { throw new IllegalArgumentException("not an IP: " + hostAddress); Modified: branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataSail.java =================================================================== --- branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataSail.java 2014-03-23 17:46:59 UTC (rev 8011) +++ branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataSail.java 2014-03-23 22:45:13 UTC (rev 8012) @@ -23,7 +23,7 @@ /* Portions of this code are: -Copyright Aduna (http://www.aduna-software.com/) � 2001-2007 +Copyright Aduna (http://www.aduna-software.com/) 2001-2007 All rights reserved. @@ -146,6 +146,7 @@ import com.bigdata.relation.accesspath.IElementFilter; import com.bigdata.service.AbstractFederation; import com.bigdata.service.IBigdataFederation; +import com.bigdata.striterator.ChunkedArrayIterator; import com.bigdata.striterator.CloseableIteratorWrapper; import com.bigdata.striterator.IChunkedIterator; import com.bigdata.striterator.IChunkedOrderedIterator; @@ -2786,6 +2787,125 @@ } + /** + * Note: The CONTEXT is ignored when in statementIdentifier mode! + */ + public synchronized int removeStatements(final ISPO[] stmts, final int numStmts) throws SailException { + + assertWritableConn(); + + flushStatementBuffers(true/* flushAssertBuffer */, false/* flushRetractBuffer */); + + if (m_listeners != null) { + + /* + * FIXME to support the SailConnectionListener we need to + * pre-materialize the explicit statements that are to be + * deleted and then notify the listener for each such explicit + * statement. Since that is a lot of work, make sure that we do + * not generate notices unless there are registered listeners! + */ + + throw new UnsupportedOperationException(); + + } + + // #of explicit statements removed. + long n = 0; + + if (getTruthMaintenance()) { + + /* + * Since we are doing truth maintenance we need to copy the + * matching "explicit" statements into a temporary store rather + * than deleting them directly. This uses the internal API to + * copy the statements to the temporary store without + * materializing them as Sesame Statement objects. + */ + + /* + * Obtain a chunked iterator using the triple pattern that + * visits only the explicit statements. + */ + final IChunkedOrderedIterator<ISPO> itr = + new ChunkedArrayIterator<ISPO>(numStmts, stmts, + null/* keyOrder */); + + // The tempStore absorbing retractions. + final AbstractTripleStore tempStore = getRetractionBuffer() + .getStatementStore(); + + // Copy explicit statements to tempStore. + n = tempStore.addStatements(tempStore, true/* copyOnly */, + itr, null/* filter */); + + /* + * Nothing more happens until the commit or incremental write + * flushes the retraction buffer and runs TM. + */ + + } else { + + /* + * Since we are not doing truth maintenance, just remove the + * statements from the database (synchronous, batch api, not + * buffered). + */ + + if (changeLog == null) { + + n = database.removeStatements(stmts, numStmts); + + } else { + +// final IChunkedOrderedIterator<ISPO> itr = +// database.computeClosureForStatementIdentifiers( +// new ChunkedArrayIterator<ISPO>(numStmts, stmts, +// null/* keyOrder */)); + + // no need to compute closure for sids since we just did it + n = StatementWriter.removeStatements(database, stmts, numStmts, + database.getStatementIdentifiers()/* computeClosureForStatementIdentifiers */, + changeLog); + +// final IAccessPath<ISPO> ap = +// database.getAccessPath(s, p, o, c); +// +// final IChunkedOrderedIterator<ISPO> itr = ap.iterator(); +// +// if (itr.hasNext()) { +// +// final BigdataStatementIteratorImpl itr2 = +// new BigdataStatementIteratorImpl(database, bnodes2, itr) +// .start(database.getExecutorService()); +// +// final BigdataStatement[] stmts = +// new BigdataStatement[database.getChunkCapacity()]; +// +// int i = 0; +// while (i < stmts.length && itr2.hasNext()) { +// stmts[i++] = itr2.next(); +// if (i == stmts.length) { +// // process stmts[] +// n += removeAndNotify(stmts, i); +// i = 0; +// } +// } +// if (i > 0) { +// n += removeAndNotify(stmts, i); +// } +// +// } + + } + + } + + // avoid overflow. + return (int) Math.min(Integer.MAX_VALUE, n); + + } + // private long removeAndNotify(final BigdataStatement[] stmts, final int numStmts) { // // final SPO[] tmp = new SPO[numStmts]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mrp...@us...> - 2014-03-23 22:52:48
|
Revision: 8013 http://sourceforge.net/p/bigdata/code/8013 Author: mrpersonick Date: 2014-03-23 22:52:45 +0000 (Sun, 23 Mar 2014) Log Message: ----------- expose a bulk remove(ISPO) method on the sail Modified Paths: -------------- branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/changesets/StatementWriter.java branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataSail.java Modified: branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/changesets/StatementWriter.java =================================================================== --- branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/changesets/StatementWriter.java 2014-03-23 22:45:13 UTC (rev 8012) +++ branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/changesets/StatementWriter.java 2014-03-23 22:52:45 UTC (rev 8013) @@ -130,7 +130,7 @@ // // final BigdataStatement[] stmts = // new BigdataStatement[database.getChunkCapacity()]; - final SPO[] stmts = new SPO[database.getChunkCapacity()]; + final ISPO[] stmts = new ISPO[database.getChunkCapacity()]; int i = 0; while ((i = nextChunk(itr, stmts)) > 0) { Modified: branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataSail.java =================================================================== --- branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataSail.java 2014-03-23 22:45:13 UTC (rev 8012) +++ branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataSail.java 2014-03-23 22:52:45 UTC (rev 8013) @@ -2790,7 +2790,7 @@ /** * Note: The CONTEXT is ignored when in statementIdentifier mode! */ - public synchronized int removeStatements(final ISPO[] stmts, final int numStmts) throws SailException { + public synchronized int removeStatements(final ISPO[] stmts) throws SailException { assertWritableConn(); @@ -2828,8 +2828,7 @@ * visits only the explicit statements. */ final IChunkedOrderedIterator<ISPO> itr = - new ChunkedArrayIterator<ISPO>(numStmts, stmts, - null/* keyOrder */); + new ChunkedArrayIterator<ISPO>(stmts); // The tempStore absorbing retractions. final AbstractTripleStore tempStore = getRetractionBuffer() @@ -2854,18 +2853,17 @@ if (changeLog == null) { - n = database.removeStatements(stmts, numStmts); + n = database.removeStatements(stmts, stmts.length); } else { -// final IChunkedOrderedIterator<ISPO> itr = -// database.computeClosureForStatementIdentifiers( -// new ChunkedArrayIterator<ISPO>(numStmts, stmts, -// null/* keyOrder */)); + final IChunkedOrderedIterator<ISPO> itr = + database.computeClosureForStatementIdentifiers( + new ChunkedArrayIterator<ISPO>(stmts)); // no need to compute closure for sids since we just did it - n = StatementWriter.removeStatements(database, stmts, numStmts, - database.getStatementIdentifiers()/* computeClosureForStatementIdentifiers */, + n = StatementWriter.removeStatements(database, itr, + false/* computeClosureForStatementIdentifiers */, changeLog); // final IAccessPath<ISPO> ap = This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mrp...@us...> - 2014-04-03 21:17:06
|
Revision: 8035 http://sourceforge.net/p/bigdata/code/8035 Author: mrpersonick Date: 2014-04-03 21:17:03 +0000 (Thu, 03 Apr 2014) Log Message: ----------- added the ability to halt a program once the "target" vertices have been visited, either immediately or a specified number of iterations afterwards Modified Paths: -------------- branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/IGASContext.java branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/IGASState.java branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/impl/GASContext.java branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/impl/GASState.java branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/graph/impl/bd/GASService.java Modified: branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/IGASContext.java =================================================================== --- branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/IGASContext.java 2014-04-03 21:15:33 UTC (rev 8034) +++ branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/IGASContext.java 2014-04-03 21:17:03 UTC (rev 8035) @@ -15,6 +15,7 @@ */ package com.bigdata.rdf.graph; +import java.util.Set; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; @@ -174,7 +175,7 @@ * the attributes for the edges). */ void setLinkAttributeType(URI linkType); - + /** * Set an optional {@link IReducer} that will run after the * {@link IGASProgram} is terminated. This may be used to extract results @@ -227,5 +228,35 @@ */ @Override IGASStats call() throws Exception; + + + /** + * Set the target vertices for the program (if any). + */ + void setTargetVertices(Value[] targetVertices); + /** + * Get the target vertices for the program (if any). + * @return + */ + Set<Value> getTargetVertices(); + + /** + * Specify the maximum number of iterations for the algorithm to continue + * once all the target vertices have been reached. Default is for the + * program to run until completion without regard to whether the target + * vertices have been reached or not. A value of ZERO will stop the program + * exactly when all target vertices are found in the frontier. + * + * @param newValue + * The maximum number of iterations past the target vertices. + */ + void setMaxIterationsAfterTargets(int newValue); + + /** + * Return the maximum number iterations for the algorithm to continue + * once all the target vertices have been reached. + */ + int getMaxIterationsAfterTargets(); + } \ No newline at end of file Modified: branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/IGASState.java =================================================================== --- branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/IGASState.java 2014-04-03 21:15:33 UTC (rev 8034) +++ branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/IGASState.java 2014-04-03 21:17:03 UTC (rev 8035) @@ -119,6 +119,18 @@ boolean isVisited(Value v); /** + * Return <code>true</code> iff the specified vertices all have an associated + * vertex state object - this is interpreted as meaning that the vertex has + * been "visited". + * + * @param v + * The vertices. + * @return <code>true</code> iff there is vertex state associated with all + * specified vertices. + */ + boolean isVisited(Set<Value> v); + + /** * The current frontier. */ IStaticFrontier frontier(); Modified: branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/impl/GASContext.java =================================================================== --- branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/impl/GASContext.java 2014-04-03 21:15:33 UTC (rev 8034) +++ branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/impl/GASContext.java 2014-04-03 21:17:03 UTC (rev 8035) @@ -15,7 +15,11 @@ */ package com.bigdata.rdf.graph.impl; +import java.util.Arrays; +import java.util.Collections; import java.util.Iterator; +import java.util.LinkedHashSet; +import java.util.Set; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; @@ -100,6 +104,20 @@ null); /** + * A collection of target vertices for the program to reach. + */ + private final Set<Value> targetVertices = + Collections.synchronizedSet(new LinkedHashSet<Value>()); + + /** + * The maximum number of iterations after the target vertices have been + * reached. Default behavior is to continue on even after the targets have + * been reached. + */ + private final AtomicInteger maxIterationsAfterTargets = new AtomicInteger( + Integer.MAX_VALUE); + + /** * * @param namespace * The namespace of the graph (KB instance). @@ -158,6 +176,11 @@ program.before(this); + if (log.isTraceEnabled()) { + log.trace("# of targets: " + targetVertices.size()); + log.trace("max iterations after targets: " + maxIterationsAfterTargets.get()); + } + while (!gasState.frontier().isEmpty()) { /* @@ -167,7 +190,30 @@ * GASStats. */ - if (total.getNRounds() + 1 >= getMaxIterations()) { + if (targetVertices.size() > 0 && + getMaxIterationsAfterTargets() < Integer.MAX_VALUE) { + + if (gasState.isVisited(targetVertices)) { + + /* + * If we've reached all target vertices then halt the + * program N rounds from now where + * N = maxIterationsAfterTargets. + */ + this.maxIterations.set(Math.min(getMaxIterations(), + (int) total.getNRounds() + getMaxIterationsAfterTargets())); + + if (log.isTraceEnabled()) { + log.trace("All targets reached at round " + + total.getNRounds() + ", halting at round " + + this.maxIterations.get()); + } + + } + + } + + if (total.getNRounds() + 1 > getMaxIterations()) { log.warn("Halting: maxIterations=" + getMaxIterations() + ", #rounds=" + total.getNRounds()); @@ -882,7 +928,40 @@ this.linkAttributeType.set(linkAttributeType); } + + @Override + public void setTargetVertices(final Value[] targetVertices) { + + this.targetVertices.addAll(Arrays.asList(targetVertices)); + + } + @Override + public Set<Value> getTargetVertices() { + + return this.targetVertices; + + } + + @Override + public void setMaxIterationsAfterTargets(final int newValue) { + + if (newValue < 0) + throw new IllegalArgumentException(); + + this.maxIterationsAfterTargets.set(newValue); + + } + + @Override + public int getMaxIterationsAfterTargets() { + + return maxIterationsAfterTargets.get(); + + } + + + // /** // * {@inheritDoc} // * <p> Modified: branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/impl/GASState.java =================================================================== --- branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/impl/GASState.java 2014-04-03 21:15:33 UTC (rev 8034) +++ branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/impl/GASState.java 2014-04-03 21:17:03 UTC (rev 8035) @@ -217,6 +217,13 @@ } @Override + public boolean isVisited(final Set<Value> v) { + + return vertexState.keySet().containsAll(v); + + } + + @Override public ES getState(final Statement e) { if (edgeState == null) @@ -453,4 +460,10 @@ } +// public Set<Value> values() { +// +// return vertexState.keySet(); +// +// } + } Modified: branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/graph/impl/bd/GASService.java =================================================================== --- branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/graph/impl/bd/GASService.java 2014-04-03 21:15:33 UTC (rev 8034) +++ branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/graph/impl/bd/GASService.java 2014-04-03 21:17:03 UTC (rev 8035) @@ -194,6 +194,19 @@ int DEFAULT_MAX_ITERATIONS = Integer.MAX_VALUE; /** + * The maximum #of iterations for the GAS program after the targets + * have been reached (optional, default + * {@value #DEFAULT_MAX_ITERATIONS_AFTER_TARGETS}). Default behavior + * is to not stop once the targets are reached. + * + * @see #DEFAULT_MAX_ITERATIONS_AFTER_TARGETS + * @see IGASContext#setMaxIterationsAfterTargets(int) + */ + URI MAX_ITERATIONS_AFTER_TARGETS = new URIImpl(NAMESPACE + "maxIterationsAfterTargets"); + + int DEFAULT_MAX_ITERATIONS_AFTER_TARGETS = Integer.MAX_VALUE; + + /** * The maximum #of vertices in the visited set for the GAS program * (optional, default {@value #DEFAULT_MAX_VISITED}). * @@ -406,6 +419,7 @@ private final int nthreads; private final TraversalDirectionEnum traversalDirection; private final int maxIterations; + private final int maxIterationsAfterTargets; private final int maxVisited; private final URI linkType, linkAttrType; private final Class<IGASProgram<VS, ES, ST>> gasClass; @@ -452,6 +466,11 @@ .createLiteral(Options.DEFAULT_MAX_ITERATIONS))) .intValue(); + this.maxIterationsAfterTargets = ((Literal) getOnlyArg(Options.PROGRAM, + Options.MAX_ITERATIONS_AFTER_TARGETS, store.getValueFactory() + .createLiteral(Options.DEFAULT_MAX_ITERATIONS_AFTER_TARGETS))) + .intValue(); + this.maxVisited = ((Literal) getOnlyArg( Options.PROGRAM, Options.MAX_VISITED, @@ -774,8 +793,16 @@ gasContext.setMaxIterations(maxIterations); + gasContext.setMaxIterationsAfterTargets(maxIterationsAfterTargets); + gasContext.setMaxVisited(maxVisited); + + if (targetVertices != null) { + gasContext.setTargetVertices(toIV(targetVertices)); + + } + // Optional link type constraint. if (linkType != null) gasContext.setLinkType(linkType); @@ -803,7 +830,7 @@ gasState.setFrontier(gasContext, tmp); } - + // Run the analytic. final IGASStats stats = (IGASStats) gasContext.call(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mrp...@us...> - 2014-04-04 19:56:45
|
Revision: 8055 http://sourceforge.net/p/bigdata/code/8055 Author: mrpersonick Date: 2014-04-04 19:56:42 +0000 (Fri, 04 Apr 2014) Log Message: ----------- added support for multiple bindings to an output variable on a gas program service call Modified Paths: -------------- branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/IBinder.java branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/analytics/BFS.java branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/analytics/CC.java branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/analytics/PATHS.java branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/analytics/PR.java branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/analytics/SSSP.java branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/impl/BaseGASProgram.java branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/graph/impl/bd/GASService.java branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/paths4.rq Added Paths: ----------- branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/BinderBase.java Added: branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/BinderBase.java =================================================================== --- branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/BinderBase.java (rev 0) +++ branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/BinderBase.java 2014-04-04 19:56:42 UTC (rev 8055) @@ -0,0 +1,70 @@ +/** + Copyright (C) SYSTAP, LLC 2006-2012. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ +package com.bigdata.rdf.graph; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.openrdf.model.Value; +import org.openrdf.model.ValueFactory; + +import com.bigdata.bop.IBindingSet; +import com.bigdata.bop.IVariable; + +/** + * A base class for IBinders. + */ +public abstract class BinderBase<VS, ES, ST> implements IBinder<VS, ES, ST> { + + /** + * The ordinal index of the variable that is bound by this + * {@link BinderBase}. By convention, index ZERO is the vertex. Indices + * greater than ZERO are typically aspects of the state of the vertex. + */ + @Override + public abstract int getIndex(); + + /** + * Subclasses can implement this method if they follow the old single + * bind paradigm. + */ + public abstract Value bind(ValueFactory vf, final IGASState<VS, ES, ST> state, Value v); + + /** + * Call {@link #bind(ValueFactory, IGASState, Value)}. + */ + @Override + @SuppressWarnings("unchecked") + public List<Value> bind(final ValueFactory vf, final IGASState<VS, ES, ST> state, + final Value u, final IVariable<?>[] outVars, final IBindingSet bs) { + + final Value val = bind(vf, state, u); + + if (val == null) { + + return Collections.EMPTY_LIST; + + } else { + + return Arrays.asList(new Value[] { val }); + + } + + } + +} + Property changes on: branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/BinderBase.java ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Modified: branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/IBinder.java =================================================================== --- branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/IBinder.java 2014-04-04 17:15:05 UTC (rev 8054) +++ branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/IBinder.java 2014-04-04 19:56:42 UTC (rev 8055) @@ -15,9 +15,14 @@ */ package com.bigdata.rdf.graph; +import java.util.List; + import org.openrdf.model.Value; import org.openrdf.model.ValueFactory; +import com.bigdata.bop.IBindingSet; +import com.bigdata.bop.IVariable; + /** * An interface that may be used to extract variable bindings for the * vertices visited by the algorithm. @@ -35,17 +40,35 @@ int getIndex(); /** + * New multi-binding strategy allows binders to bind multiple values to + * a given output variable (multiplying the number of solutions by the + * number of bindings). + * * @param vf * The {@link ValueFactory} used to create the return * {@link Value}. + * + * @param state + * The {@link IGASState}. + * * @param u - * The vertex. + * The vertex. * + * @param outVars + * The array of output variables. + * + * @param bs + * The current binding set. Can be used to conditionally bind + * values based on the current solution. + * * @return The {@link Value} for that ordinal variable or * <code>null</code> if there is no binding for that ordinal * variable. */ - Value bind(ValueFactory vf, final IGASState<VS, ES, ST> state, Value u); + List<Value> bind(ValueFactory vf, IGASState<VS, ES, ST> state, + Value u, IVariable<?>[] outVars, IBindingSet bs); +// Value bind(ValueFactory vf, final IGASState<VS, ES, ST> state, Value u); + } Modified: branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/analytics/BFS.java =================================================================== --- branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/analytics/BFS.java 2014-04-04 17:15:05 UTC (rev 8054) +++ branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/analytics/BFS.java 2014-04-04 19:56:42 UTC (rev 8055) @@ -25,6 +25,7 @@ import org.openrdf.model.Value; import org.openrdf.model.ValueFactory; +import com.bigdata.rdf.graph.BinderBase; import com.bigdata.rdf.graph.EdgesEnum; import com.bigdata.rdf.graph.Factory; import com.bigdata.rdf.graph.FrontierEnum; @@ -282,7 +283,7 @@ final List<IBinder<BFS.VS, BFS.ES, Void>> tmp = super.getBinderList(); - tmp.add(new IBinder<BFS.VS, BFS.ES, Void>() { + tmp.add(new BinderBase<BFS.VS, BFS.ES, Void>() { @Override public int getIndex() { @@ -296,9 +297,10 @@ return vf.createLiteral(state.getState(u).depth.get()); } + }); - tmp.add(new IBinder<BFS.VS, BFS.ES, Void>() { + tmp.add(new BinderBase<BFS.VS, BFS.ES, Void>() { @Override public int getIndex() { @@ -312,6 +314,7 @@ return state.getState(u).predecessor.get(); } + }); return tmp; Modified: branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/analytics/CC.java =================================================================== --- branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/analytics/CC.java 2014-04-04 17:15:05 UTC (rev 8054) +++ branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/analytics/CC.java 2014-04-04 19:56:42 UTC (rev 8055) @@ -27,6 +27,7 @@ import org.openrdf.model.Value; import org.openrdf.model.ValueFactory; +import com.bigdata.rdf.graph.BinderBase; import com.bigdata.rdf.graph.EdgesEnum; import com.bigdata.rdf.graph.Factory; import com.bigdata.rdf.graph.FrontierEnum; @@ -319,7 +320,7 @@ final List<IBinder<CC.VS, CC.ES, Value>> tmp = super.getBinderList(); - tmp.add(new IBinder<CC.VS, CC.ES, Value>() { + tmp.add(new BinderBase<CC.VS, CC.ES, Value>() { @Override public int getIndex() { @@ -333,6 +334,7 @@ return state.getState(u).label.get(); } + }); return tmp; Modified: branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/analytics/PATHS.java =================================================================== --- branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/analytics/PATHS.java 2014-04-04 17:15:05 UTC (rev 8054) +++ branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/analytics/PATHS.java 2014-04-04 19:56:42 UTC (rev 8055) @@ -15,20 +15,25 @@ */ package com.bigdata.rdf.graph.analytics; -import java.util.Arrays; import java.util.Collections; import java.util.HashSet; -import java.util.Iterator; +import java.util.LinkedHashMap; import java.util.LinkedHashSet; +import java.util.LinkedList; import java.util.List; +import java.util.Map; import java.util.Set; import java.util.concurrent.atomic.AtomicInteger; import org.apache.log4j.Logger; import org.openrdf.model.Statement; +import org.openrdf.model.URI; import org.openrdf.model.Value; import org.openrdf.model.ValueFactory; +import com.bigdata.bop.IBindingSet; +import com.bigdata.bop.IVariable; +import com.bigdata.rdf.graph.BinderBase; import com.bigdata.rdf.graph.EdgesEnum; import com.bigdata.rdf.graph.Factory; import com.bigdata.rdf.graph.FrontierEnum; @@ -39,14 +44,15 @@ import com.bigdata.rdf.graph.IGASState; import com.bigdata.rdf.graph.IPredecessor; import com.bigdata.rdf.graph.impl.BaseGASProgram; +import com.bigdata.rdf.internal.IV; /** - * Breadth First Search (BFS) is an iterative graph traversal primitive. The - * frontier is expanded iteratively until no new vertices are discovered. Each - * visited vertex is marked with the round (origin ZERO) in which it was - * visited. This is its distance from the initial frontier. - * - * @author <a href="mailto:tho...@us...">Bryan Thompson</a> + * PATHS is an iterative graph traversal operation. The frontier is expanded + * iteratively until no new vertices are discovered, or until the target + * vertices have all been reached. Each vertex is marked with its depth and with + * a list of all predecessors and their edges to the vertex. This algorithm is + * useful for creating a complete connected subgraph between a source and a set + * of targets. */ public class PATHS extends BaseGASProgram<PATHS.VS, PATHS.ES, Void> implements IPredecessor<PATHS.VS, PATHS.ES, Void> { @@ -70,11 +76,12 @@ private final AtomicInteger depth = new AtomicInteger(-1); /** - * The predecessors are the first source vertex to visit a given target - * vertex. + * The predecessors are the source vertices to visit a given target + * vertex. Each one has a list of edges along which they were able to + * reach this vertex. */ - private final Set<Value> predecessors = - Collections.synchronizedSet(new LinkedHashSet<Value>()); + private final Map<Value, Set<URI>> predecessors = + Collections.synchronizedMap(new LinkedHashMap<Value, Set<URI>>()); /** * The depth at which this vertex was first visited (origin ZERO) and @@ -87,13 +94,33 @@ } /** - * Return the first vertex to discover this vertex during BFS traversal. + * Return the vertices that discovered this vertex during BFS traversal. */ - public Set<Value> predecessors() { + public Map<Value, Set<URI>> predecessors() { return predecessors; } + + /** + * Add a predecessor (might have already been added) and the edge + * along which the predecessor discovered this vertex. + */ + public synchronized void addPredecessor(final Value pred, final URI edge) { + + Set<URI> edges = predecessors.get(pred); + + if (edges == null) { + + edges = new LinkedHashSet<URI>(); + + predecessors.put(pred, edges); + + } + + edges.add(edge); + + } /** * Note: This marks the vertex at the current traversal depth. @@ -103,21 +130,20 @@ * first visited the vertex (this helps to avoid multiple * scheduling of a vertex). */ - public boolean visit(final int depth, final Value predecessor) { - if (predecessor != null) - this.predecessors.add(predecessor); + public boolean visit(final int depth, final Value pred, final URI edge) { + + if (pred != null) { +// this.predecessors.add(pred); + addPredecessor(pred, edge); + } + if (this.depth.compareAndSet(-1/* expect */, depth/* newValue */)) { // Scheduled by this thread. return true; } + return false; -// synchronized (this) { -// if (this.depth == -1) { -// this.depth = depth; -// return true; -// } -// return false; -// } + } @Override @@ -187,7 +213,7 @@ public void initVertex(final IGASContext<PATHS.VS, PATHS.ES, Void> ctx, final IGASState<PATHS.VS, PATHS.ES, Void> state, final Value u) { - state.getState(u).visit(0, null/* predecessor */); + state.getState(u).visit(0, null/* predecessor */, null/* edge */); } @@ -245,11 +271,6 @@ public void scatter(final IGASState<PATHS.VS, PATHS.ES, Void> state, final IGASScheduler sch, final Value u, final Statement e) { -// if (state.getTargetVertices().contains(u)) { -// // don't schedule any more vertices, we've hit a target -// return; -// } - // remote vertex state. final Value v = state.getOtherVertex(u, e); @@ -257,7 +278,7 @@ // final VS otherState = state.getState(e.getObject()/* v */); // visit. - if (otherState.visit(state.round() + 1, u/* predecessor */)) { + if (otherState.visit(state.round() + 1, u/* predecessor */, e.getPredicate())) { /* * This is the first visit for the remote vertex. Add it to the @@ -284,9 +305,12 @@ * <dt>{@value Bindings#DEPTH}</dt> * <dd>The depth at which the vertex was first encountered during traversal. * </dd> - * <dt>{@value Bindings#PREDECESSOR}</dt> - * <dd>The predecessor is the first vertex that discovers a given vertex + * <dt>{@value Bindings#PREDECESSORS}</dt> + * <dd>The predecessors are all the vertices that discovers a given vertex * during traversal.</dd> + * <dt>{@value Bindings#EDGES}</dt> + * <dd>These are the edges along which each predecessor discovered a given + * vertex during traversal.</dd> * </dl> */ @Override @@ -294,7 +318,7 @@ final List<IBinder<PATHS.VS, PATHS.ES, Void>> tmp = super.getBinderList(); - tmp.add(new IBinder<PATHS.VS, PATHS.ES, Void>() { + tmp.add(new BinderBase<PATHS.VS, PATHS.ES, Void>() { @Override public int getIndex() { @@ -308,28 +332,89 @@ return vf.createLiteral(state.getState(u).depth.get()); } + }); tmp.add(new IBinder<PATHS.VS, PATHS.ES, Void>() { @Override public int getIndex() { - return Bindings.PREDECESSOR; + return Bindings.PREDECESSORS; } @Override - public Value bind(final ValueFactory vf, - final IGASState<PATHS.VS, PATHS.ES, Void> state, final Value u) { + public List<Value> bind(final ValueFactory vf, + final IGASState<PATHS.VS, PATHS.ES, Void> state, + final Value u, final IVariable<?>[] outVars, + final IBindingSet bs) { - final String s = Arrays.toString(state.getState(u).predecessors.toArray()); + final VS vs = state.getState(u); - if (log.isTraceEnabled()) { - log.trace(s); + return new LinkedList<Value>(vs.predecessors().keySet()); + + } + + }); + + tmp.add(new IBinder<PATHS.VS, PATHS.ES, Void>() { + + @Override + public int getIndex() { + return Bindings.EDGES; + } + + @Override + @SuppressWarnings({ "rawtypes", "unchecked" }) + public List<Value> bind(final ValueFactory vf, + final IGASState<PATHS.VS, PATHS.ES, Void> state, + final Value u, final IVariable<?>[] outVars, + final IBindingSet bs) { + + /* + * We want to return a different set of edges depending on + * which predecessor the caller is asking about. We can + * find that information in the binding set. + */ + + final IVariable<?> var = outVars[Bindings.PREDECESSORS]; + + if (!bs.isBound(var)) { + + if (log.isTraceEnabled()) { + log.trace("no predecessors"); + } + + return Collections.EMPTY_LIST; + } - return vf.createLiteral(s); + final IV predIV = (IV) bs.get(var).get(); + + final Value predVal; + + if (predIV instanceof Value) { + + predVal = (Value) predIV; + + } else if (predIV.hasValue()) { + + predVal = predIV.getValue(); + + } else { + + throw new RuntimeException("FIXME"); + + } + + final VS vs = state.getState(u); + + /* + * Return the edges for this predecessor. + */ + return new LinkedList<Value>(vs.predecessors().get(predVal)); } + }); return tmp; @@ -349,70 +434,18 @@ int DEPTH = 1; /** - * The BFS predecessor is the first vertex to discover a given vertex. + * The predecessors are all vertices to discover a given vertex. * */ - int PREDECESSOR = 2; + int PREDECESSORS = 2; + /** + * The edges along which each predecessor discovered a given vertex. + */ + int EDGES = 3; + } -// /** -// * Reduce the active vertex state, returning a histogram reporting the #of -// * vertices at each distance from the starting vertex. There will always be -// * one vertex at depth zero - this is the starting vertex. For each -// * successive depth, the #of vertices that were labeled at that depth is -// * reported. This is essentially the same as reporting the size of the -// * frontier in each round of the traversal, but the histograph is reported -// * based on the vertex state. -// * -// * @author <a href="mailto:tho...@us...">Bryan -// * Thompson</a> -// */ -// protected static class HistogramReducer implements -// IReducer<VS, ES, Void, Map<Integer, AtomicLong>> { -// -// private final ConcurrentHashMap<Integer, AtomicLong> values = new ConcurrentHashMap<Integer, AtomicLong>(); -// -// @Override -// public void visit(final IGASState<VS, ES, Void> state, final Value u) { -// -// final VS us = state.getState(u); -// -// if (us != null) { -// -// final Integer depth = Integer.valueOf(us.depth()); -// -// AtomicLong newval = values.get(depth); -// -// if (newval == null) { -// -// final AtomicLong oldval = values.putIfAbsent(depth, -// newval = new AtomicLong()); -// -// if (oldval != null) { -// -// // lost data race. -// newval = oldval; -// -// } -// -// } -// -// newval.incrementAndGet(); -// -// } -// -// } -// -// @Override -// public Map<Integer, AtomicLong> get() { -// -// return Collections.unmodifiableMap(values); -// -// } -// -// } - /* * TODO Do this in parallel for each specified target vertex. */ @@ -428,10 +461,6 @@ final IGASState<PATHS.VS, PATHS.ES, Void> gasState = ctx.getGASState(); -// for (Value v : gasState.values()) { -// log.trace(v); -// } - final Set<Value> retainSet = new HashSet<Value>(); for (Value v : targetVertices) { @@ -450,20 +479,6 @@ visitPredecessors(gasState, v, retainSet); -// Value current = v; -// -// while (current != null) { -// -// retainSet.add(current); -// -// final PATHS.VS currentState = gasState.getState(current); -// -// final Value predecessor = currentState.predecessor(); -// -// current = predecessor; -// -// } - } // next target vertex. gasState.retainAll(retainSet); @@ -476,7 +491,7 @@ final PATHS.VS currentState = gasState.getState(v); - for (Value pred : currentState.predecessors()) { + for (Value pred : currentState.predecessors().keySet()) { if (pred == null) { @@ -498,71 +513,4 @@ } -// @Override -// public <T> IReducer<VS, ES, Void, T> getDefaultAfterOp() { -// -// class NV implements Comparable<NV> { -// public final int n; -// public final long v; -// public NV(final int n, final long v) { -// this.n = n; -// this.v = v; -// } -// @Override -// public int compareTo(final NV o) { -// if (o.n > this.n) -// return -1; -// if (o.n < this.n) -// return 1; -// return 0; -// } -// } -// -// final IReducer<VS, ES, Void, T> outerReducer = new IReducer<VS, ES, Void, T>() { -// -// final HistogramReducer innerReducer = new HistogramReducer(); -// -// @Override -// public void visit(IGASState<VS, ES, Void> state, Value u) { -// -// innerReducer.visit(state, u); -// -// } -// -// @Override -// public T get() { -// -// final Map<Integer, AtomicLong> h = innerReducer.get(); -// -// final NV[] a = new NV[h.size()]; -// -// int i = 0; -// -// for (Map.Entry<Integer, AtomicLong> e : h.entrySet()) { -// -// a[i++] = new NV(e.getKey().intValue(), e.getValue().get()); -// -// } -// -// Arrays.sort(a); -// -// System.out.println("distance, frontierSize, sumFrontierSize"); -// long sum = 0L; -// for (NV t : a) { -// -// System.out.println(t.n + ", " + t.v + ", " + sum); -// -// sum += t.v; -// -// } -// -// return null; -// } -// -// }; -// -// return outerReducer; -// -// } - } Modified: branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/analytics/PR.java =================================================================== --- branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/analytics/PR.java 2014-04-04 17:15:05 UTC (rev 8054) +++ branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/analytics/PR.java 2014-04-04 19:56:42 UTC (rev 8055) @@ -25,6 +25,7 @@ import org.openrdf.model.Value; import org.openrdf.model.ValueFactory; +import com.bigdata.rdf.graph.BinderBase; import com.bigdata.rdf.graph.EdgesEnum; import com.bigdata.rdf.graph.Factory; import com.bigdata.rdf.graph.FrontierEnum; @@ -352,7 +353,7 @@ final List<IBinder<PR.VS, PR.ES, Double>> tmp = super.getBinderList(); - tmp.add(new IBinder<PR.VS, PR.ES, Double>() { + tmp.add(new BinderBase<PR.VS, PR.ES, Double>() { @Override public int getIndex() { @@ -366,6 +367,7 @@ return vf.createLiteral(state.getState(u).getValue()); } + }); return tmp; Modified: branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/analytics/SSSP.java =================================================================== --- branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/analytics/SSSP.java 2014-04-04 17:15:05 UTC (rev 8054) +++ branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/analytics/SSSP.java 2014-04-04 19:56:42 UTC (rev 8055) @@ -25,6 +25,11 @@ import org.openrdf.model.Value; import org.openrdf.model.ValueFactory; +import sun.reflect.generics.reflectiveObjects.NotImplementedException; + +import com.bigdata.bop.IBindingSet; +import com.bigdata.bop.IVariable; +import com.bigdata.rdf.graph.BinderBase; import com.bigdata.rdf.graph.EdgesEnum; import com.bigdata.rdf.graph.Factory; import com.bigdata.rdf.graph.FrontierEnum; @@ -441,7 +446,7 @@ final List<IBinder<SSSP.VS, SSSP.ES, Integer>> tmp = super .getBinderList(); - tmp.add(new IBinder<SSSP.VS, SSSP.ES, Integer>() { + tmp.add(new BinderBase<SSSP.VS, SSSP.ES, Integer>() { @Override public int getIndex() { @@ -456,9 +461,10 @@ return vf.createLiteral(state.getState(u).dist()); } + }); - tmp.add(new IBinder<SSSP.VS, SSSP.ES, Integer>() { + tmp.add(new BinderBase<SSSP.VS, SSSP.ES, Integer>() { @Override public int getIndex() { @@ -472,6 +478,7 @@ return state.getState(u).predecessor.get(); } + }); return tmp; Modified: branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/impl/BaseGASProgram.java =================================================================== --- branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/impl/BaseGASProgram.java 2014-04-04 17:15:05 UTC (rev 8054) +++ branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/impl/BaseGASProgram.java 2014-04-04 19:56:42 UTC (rev 8055) @@ -26,6 +26,8 @@ import org.openrdf.model.Value; import org.openrdf.model.ValueFactory; + +import com.bigdata.rdf.graph.BinderBase; import com.bigdata.rdf.graph.EdgesEnum; import com.bigdata.rdf.graph.Factory; import com.bigdata.rdf.graph.FrontierEnum; @@ -237,7 +239,7 @@ final List<IBinder<VS, ES, ST>> tmp = new LinkedList<IBinder<VS, ES, ST>>(); - tmp.add(new IBinder<VS, ES, ST>() { + tmp.add(new BinderBase<VS, ES, ST>() { @Override public int getIndex() { Modified: branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/graph/impl/bd/GASService.java =================================================================== --- branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/graph/impl/bd/GASService.java 2014-04-04 17:15:05 UTC (rev 8054) +++ branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/graph/impl/bd/GASService.java 2014-04-04 19:56:42 UTC (rev 8055) @@ -30,6 +30,7 @@ import java.util.LinkedHashSet; import java.util.LinkedList; import java.util.List; +import java.util.ListIterator; import java.util.Set; import org.apache.log4j.Logger; @@ -995,8 +996,10 @@ @Override public void visit(final IGASState<VS, ES, ST> state, final Value u) { - final IBindingSet bs = new ListBindingSet(); + final List<IBindingSet> bSets = new LinkedList<IBindingSet>(); + bSets.add(new ListBindingSet()); + for (IBinder<VS, ES, ST> b : binderList) { // The variable for this binder. @@ -1004,65 +1007,118 @@ if(var == null) continue; - - /* - * TODO This does too much work. The API is defined in terms - * of openrdf Value objects rather than IVs because it is in - * a different package (not bigdata specific). The - * getBinderList() method should be moved to the code that - * exposes the service (this class) so it can do bigdata - * specific things and DO LESS WORK. This would be a good - * thing to do at the time that we add support for FuzzySSSP - * (which is not an IGASProgram and hence breaks the model - * anyway). - */ - final Value val = b.bind(vf, state, u); - if (val == null) - continue; + final Iterator<IBindingSet> it = bSets.iterator(); + + final List<IBindingSet> bSets2 = new LinkedList<IBindingSet>(); + + while (it.hasNext()) { + + final IBindingSet parent = it.next(); + + if (log.isTraceEnabled()) + log.trace("parent: " + parent); + + final List<Value> vals = + b.bind(vf, state, u, outVars, parent); + + if (vals.size() == 0) { + + // do nothing, leave the parent in the bSets + + } else if (vals.size() == 1) { + + /* + * Bind the single value, leave the parent in the + * bSets. + */ + + final Value val = vals.get(0); + + bind(var, val, parent); + + if (log.isTraceEnabled()) + log.trace("parent (after bind): " + parent); + + } else { + + /* + * Remove the parent from the bSets, for each new + * value, clone the parent, bind the value, and add + * the new solution to the bSets + */ + + for (Value val : vals) { + + final IBindingSet child = parent.clone(); + + bind(var, val, child); + + if (log.isTraceEnabled()) + log.trace("child: " + child); + + bSets2.add(child); + + } + + it.remove(); + + } + + } - if (val instanceof IV) { + bSets.addAll(bSets2); + + } - // The value is already an IV. - bs.set(var, new Constant((IV) val)); + // Add to the set of generated solutions. + tmp.addAll(bSets); - } else { + } - /* - * The Value is a BigdataValueImpl (if the bind() method - * used the supplied ValueFactory). We need to convert - * it to an IV and this code ASSUMES that we can do this - * using an inline IV with the as configured KB. (This - * will work for anything numeric, but not for strings.) - */ - final IV<BigdataValueImpl, ?> iv = lex - .getLexiconConfiguration().createInlineIV(val); + @SuppressWarnings({ "unchecked", "rawtypes" }) + protected void bind(final IVariable<?> var, final Value val, final IBindingSet bs) { + + if (val == null) + return; - if (iv != null) { + if (val instanceof IV) { - iv.setValue((BigdataValueImpl) val); + // The value is already an IV. + bs.set(var, new Constant((IV) val)); - bs.set(var, new Constant(iv)); - - } else if (val instanceof BigdataValue) { - - bs.set(var, new Constant(DummyConstantNode.toDummyIV((BigdataValue) val))); - - } else { - - throw new RuntimeException("FIXME"); - - } + } else { + /* + * The Value is a BigdataValueImpl (if the bind() method + * used the supplied ValueFactory). We need to convert + * it to an IV and this code ASSUMES that we can do this + * using an inline IV with the as configured KB. (This + * will work for anything numeric, but not for strings.) + */ + final IV<BigdataValueImpl, ?> iv = lex + .getLexiconConfiguration().createInlineIV(val); + + if (iv != null) { + + iv.setValue((BigdataValueImpl) val); + + bs.set(var, new Constant(iv)); + + } else if (val instanceof BigdataValue) { + + bs.set(var, new Constant(DummyConstantNode.toDummyIV((BigdataValue) val))); + + } else { + + throw new RuntimeException("FIXME"); + } } - // Add to the set of generated solutions. - tmp.add(bs); - } - + @Override public IBindingSet[] get() { Modified: branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/paths4.rq =================================================================== --- branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/paths4.rq 2014-04-04 17:15:05 UTC (rev 8054) +++ branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/paths4.rq 2014-04-04 19:56:42 UTC (rev 8055) @@ -4,7 +4,7 @@ gas:program gas:gasClass "com.bigdata.rdf.graph.analytics.PATHS" . gas:program gas:in </:target> . # starting point gas:program gas:target </:source1> . # target vertices - gas:program gas:target </:source2> . # target vertices + # gas:program gas:target </:source2> . # target vertices gas:program gas:traversalDirection "Reverse" . # gas:program gas:maxIterations 2 . gas:program gas:maxIterationsAfterTargets 0 . @@ -12,7 +12,9 @@ gas:program gas:maxVisited 100000 . gas:program gas:out ?s . # bound to the visited vertices. gas:program gas:out1 ?depth . # bound to the depth + gas:program gas:out2 ?o . # bound to the pred + gas:program gas:out3 ?p . # bound to the edge } - ?s </:edge> ?o . - filter(?s != </:target>) . + #?s </:edge> ?o . + #filter(?s != </:target>) . } order by ?depth \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mrp...@us...> - 2014-04-06 16:38:11
|
Revision: 8063 http://sourceforge.net/p/bigdata/code/8063 Author: mrpersonick Date: 2014-04-06 16:38:08 +0000 (Sun, 06 Apr 2014) Log Message: ----------- fixed SSSP/BigdataGASState to use RDR to take into account the edge value if the linkAttrType property is specified Modified Paths: -------------- branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/analytics/SSSP.java branches/RDR/bigdata-gas/src/test/com/bigdata/rdf/graph/analytics/TestSSSP.java branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/graph/impl/bd/BigdataGASState.java branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/TestPaths.java Added Paths: ----------- branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/sssp.rq branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/sssp.ttl Removed Paths: ------------- branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/paths2.rq Modified: branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/analytics/SSSP.java =================================================================== --- branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/analytics/SSSP.java 2014-04-06 16:36:28 UTC (rev 8062) +++ branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/analytics/SSSP.java 2014-04-06 16:38:08 UTC (rev 8063) @@ -21,14 +21,11 @@ import java.util.concurrent.atomic.AtomicReference; import org.apache.log4j.Logger; +import org.openrdf.model.Literal; import org.openrdf.model.Statement; import org.openrdf.model.Value; import org.openrdf.model.ValueFactory; -import sun.reflect.generics.reflectiveObjects.NotImplementedException; - -import com.bigdata.bop.IBindingSet; -import com.bigdata.bop.IVariable; import com.bigdata.rdf.graph.BinderBase; import com.bigdata.rdf.graph.EdgesEnum; import com.bigdata.rdf.graph.Factory; @@ -77,7 +74,7 @@ * is a single link attribute type that is of interest, so the caller should * also be able to specify that. */ - private final static int EDGE_LENGTH = 1; + private final static double EDGE_LENGTH = 1.0f; public static class VS { @@ -90,7 +87,7 @@ * double. We also need tests with non-integer weights and non- positive * weights. */ - private Integer dist = Integer.MAX_VALUE; + private Double dist = Double.MAX_VALUE; // /** // * Note: This flag is cleared by apply() and then conditionally set @@ -145,7 +142,7 @@ * to this vertex and {@link Integer#MAX_VALUE} until this vertex is * visited. */ - public int dist() { + public double dist() { synchronized (this) { return dist; } @@ -166,7 +163,7 @@ synchronized private void setStartingVertex() { // Set distance to zero for starting vertex. - dist = 0; + dist = 0.0; this.predecessor.set(null); // // Must be true to trigger scatter in the 1st round! @@ -220,7 +217,7 @@ * @return <code>true</code> iff this vertex state was changed. */ synchronized private boolean scatter(final Value predecessor, - final int newDist) { + final double newDist) { /* * Validate that the distance has decreased while holding the lock. */ @@ -399,11 +396,22 @@ final VS otherState = state.getState(other); + final double edgeLength; + if (e.getObject() instanceof Literal) { + + edgeLength = ((Literal) e.getObject()).doubleValue(); + + } else { + + edgeLength = EDGE_LENGTH; + + } + // new distance for the remote vertex. - final int newDist = selfState.dist() + EDGE_LENGTH; + final double newDist = selfState.dist() + edgeLength; //EDGE_LENGTH; // last observed distance for the remote vertex. - final int otherDist = otherState.dist(); + final double otherDist = otherState.dist(); // Note: test first without lock. if (newDist < otherDist) { Modified: branches/RDR/bigdata-gas/src/test/com/bigdata/rdf/graph/analytics/TestSSSP.java =================================================================== --- branches/RDR/bigdata-gas/src/test/com/bigdata/rdf/graph/analytics/TestSSSP.java 2014-04-06 16:36:28 UTC (rev 8062) +++ branches/RDR/bigdata-gas/src/test/com/bigdata/rdf/graph/analytics/TestSSSP.java 2014-04-06 16:38:08 UTC (rev 8063) @@ -70,13 +70,13 @@ // Converge. gasContext.call(); - assertEquals(0, gasState.getState(p.getMike()).dist()); + assertEquals(0.0, gasState.getState(p.getMike()).dist()); - assertEquals(1, gasState.getState(p.getFoafPerson()).dist()); + assertEquals(1.0, gasState.getState(p.getFoafPerson()).dist()); - assertEquals(1, gasState.getState(p.getBryan()).dist()); + assertEquals(1.0, gasState.getState(p.getBryan()).dist()); - assertEquals(2, gasState.getState(p.getMartyn()).dist()); + assertEquals(2.0, gasState.getState(p.getMartyn()).dist()); } finally { Modified: branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/graph/impl/bd/BigdataGASState.java =================================================================== --- branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/graph/impl/bd/BigdataGASState.java 2014-04-06 16:36:28 UTC (rev 8062) +++ branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/graph/impl/bd/BigdataGASState.java 2014-04-06 16:38:08 UTC (rev 8063) @@ -191,4 +191,29 @@ } + @Override + @SuppressWarnings("rawtypes") + public Value getOtherVertex(final Value u, final Statement e) { + + if (e.getSubject() instanceof SidIV) { + + final ISPO spo = ((SidIV) e.getSubject()).getInlineValue(); + + if (spo.s().equals(u)) + return spo.o(); + + return spo.s(); + + } else { + + if (e.getSubject().equals(u)) + return e.getObject(); + + return e.getSubject(); + + } + + } + + } Modified: branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/TestPaths.java =================================================================== --- branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/TestPaths.java 2014-04-06 16:36:28 UTC (rev 8062) +++ branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/TestPaths.java 2014-04-06 16:38:08 UTC (rev 8063) @@ -139,7 +139,47 @@ // // } // -// public void testSimpleSSSP() throws Exception { + public void testSimpleSSSP() throws Exception { + + final BigdataSail sail = getSail(); + sail.initialize(); + final BigdataSailRepository repo = new BigdataSailRepository(sail); + + final BigdataSailRepositoryConnection cxn = repo.getConnection(); + cxn.setAutoCommit(false); + + try { + + cxn.add(open("sssp.ttl"), "", RDFFormat.TURTLE); + cxn.commit(); + + log.trace("\n" + sail.getDatabase().dumpStore()); + + final String query = IOUtils.toString(open("sssp.rq")); + + log.trace("\n" + query); + + final TupleQuery tqr = cxn.prepareTupleQuery(QueryLanguage.SPARQL, + query); + + final TupleQueryResult result = tqr.evaluate(); + + while (result.hasNext()) { + + log.trace(result.next()); + + } + + result.close(); + + } finally { + cxn.close(); + sail.__tearDownUnitTest(); + } + + } + +// public void testPaths() throws Exception { // // final BigdataSail sail = getSail(); // sail.initialize(); @@ -150,12 +190,12 @@ // // try { // -// cxn.add(open("paths2.ttl"), "", RDFFormat.TURTLE); +// cxn.add(open("paths4.ttl"), "", RDFFormat.TURTLE); // cxn.commit(); // // log.trace("\n"+sail.getDatabase().dumpStore()); // -// final String query = IOUtils.toString(open("paths2.rq")); +// final String query = IOUtils.toString(open("paths4.rq")); // // log.trace("\n"+query); // @@ -178,43 +218,4 @@ // // } - public void testPaths() throws Exception { - - final BigdataSail sail = getSail(); - sail.initialize(); - final BigdataSailRepository repo = new BigdataSailRepository(sail); - - final BigdataSailRepositoryConnection cxn = repo.getConnection(); - cxn.setAutoCommit(false); - - try { - - cxn.add(open("paths4.ttl"), "", RDFFormat.TURTLE); - cxn.commit(); - - log.trace("\n"+sail.getDatabase().dumpStore()); - - final String query = IOUtils.toString(open("paths4.rq")); - - log.trace("\n"+query); - - final TupleQuery tqr = cxn.prepareTupleQuery(QueryLanguage.SPARQL, query); - - final TupleQueryResult result = tqr.evaluate(); - - while (result.hasNext()) { - - log.trace(result.next()); - - } - - result.close(); - - } finally { - cxn.close(); - sail.__tearDownUnitTest(); - } - - } - } Deleted: branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/paths2.rq =================================================================== --- branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/paths2.rq 2014-04-06 16:36:28 UTC (rev 8062) +++ branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/paths2.rq 2014-04-06 16:38:08 UTC (rev 8063) @@ -1,11 +0,0 @@ -PREFIX gas: <http://www.bigdata.com/rdf/gas#> -SELECT * { - SERVICE gas:service { - gas:program gas:gasClass "com.bigdata.rdf.graph.analytics.SSSP" . - gas:program gas:in </:source> . # starting point - gas:program gas:target </:target> . # target vertices - gas:program gas:out ?s . # bound to the visited vertices. - gas:program gas:out1 ?distance . # bound to the distance of the visited vertices. - gas:program gas:out2 ?pred . # bound to the predecessor - } -} order by ?distance \ No newline at end of file Copied: branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/sssp.rq (from rev 8059, branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/paths2.rq) =================================================================== --- branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/sssp.rq (rev 0) +++ branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/sssp.rq 2014-04-06 16:38:08 UTC (rev 8063) @@ -0,0 +1,13 @@ +PREFIX gas: <http://www.bigdata.com/rdf/gas#> +SELECT * { + SERVICE gas:service { + gas:program gas:gasClass "com.bigdata.rdf.graph.analytics.SSSP" . + gas:program gas:in </:source> . # starting point + gas:program gas:target </:target1> . # target vertices + gas:program gas:target </:target2> . # target vertices + gas:program gas:linkAttrType </:cost> . # link attribute type + gas:program gas:out ?v . # bound to the visited vertices. + gas:program gas:out1 ?distance . # bound to the distance of the visited vertices. + gas:program gas:out2 ?pred . # bound to the predecessor + } +} order by ?distance \ No newline at end of file Added: branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/sssp.ttl =================================================================== --- branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/sssp.ttl (rev 0) +++ branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/sssp.ttl 2014-04-06 16:38:08 UTC (rev 8063) @@ -0,0 +1,14 @@ +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . +@prefix bd: <http://www.bigdata.com/rdf#> . +@prefix : <:> . + +# target1: 3 hops, cost = 1.5 +<<:source :edge :a>> :cost "0.5"^^xsd:float . +<<:a :edge :b>> :cost "0.5"^^xsd:float . +<<:b :edge :target1>> :cost "0.5"^^xsd:float . + +# target2: 4 hops, cost = 1.0 +<<:source :edge :c>> :cost "0.25"^^xsd:float . +<<:c :edge :d>> :cost "0.25"^^xsd:float . +<<:d :edge :e>> :cost "0.25"^^xsd:float . +<<:e :edge :target2>> :cost "0.25"^^xsd:float . This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mrp...@us...> - 2014-04-07 21:45:08
|
Revision: 8079 http://sourceforge.net/p/bigdata/code/8079 Author: mrpersonick Date: 2014-04-07 21:45:05 +0000 (Mon, 07 Apr 2014) Log Message: ----------- fixed SSSP CI errors Modified Paths: -------------- branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/IGASState.java branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/analytics/SSSP.java branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/impl/GASState.java branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/graph/impl/bd/BigdataGASState.java branches/RDR/bigdata-rdf/src/test/com/bigdata/rdf/graph/impl/bd/TestSSSP.java Modified: branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/IGASState.java =================================================================== --- branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/IGASState.java 2014-04-07 20:46:38 UTC (rev 8078) +++ branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/IGASState.java 2014-04-07 21:45:05 UTC (rev 8079) @@ -17,6 +17,7 @@ import java.util.Set; +import org.openrdf.model.Literal; import org.openrdf.model.Statement; import org.openrdf.model.URI; import org.openrdf.model.Value; @@ -176,6 +177,18 @@ Value getOtherVertex(Value u, Statement e); /** + * Return the link attribute, if there is one. + * + * @param u + * One end of the link. + * @param e + * The link. + * + * @return The other end of the link. + */ + Literal getLinkAttr(Value u, Statement e); + + /** * Return a useful representation of an edge (non-batch API, debug only). * This method is only required when the edge objects are internal database * objects lacking fully materialized RDF {@link Value}s. In this case, it Modified: branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/analytics/SSSP.java =================================================================== --- branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/analytics/SSSP.java 2014-04-07 20:46:38 UTC (rev 8078) +++ branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/analytics/SSSP.java 2014-04-07 21:45:05 UTC (rev 8079) @@ -396,11 +396,16 @@ final VS otherState = state.getState(other); + final Literal l = state.getLinkAttr(u, e); + final double edgeLength; - if (e.getObject() instanceof Literal) { + if (l != null) { - edgeLength = ((Literal) e.getObject()).doubleValue(); + if (log.isDebugEnabled()) + log.debug(l); + edgeLength = l.doubleValue(); + } else { edgeLength = EDGE_LENGTH; Modified: branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/impl/GASState.java =================================================================== --- branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/impl/GASState.java 2014-04-07 20:46:38 UTC (rev 8078) +++ branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/impl/GASState.java 2014-04-07 21:45:05 UTC (rev 8079) @@ -23,6 +23,7 @@ import java.util.concurrent.atomic.AtomicInteger; import org.apache.log4j.Logger; +import org.openrdf.model.Literal; import org.openrdf.model.Resource; import org.openrdf.model.Statement; import org.openrdf.model.URI; @@ -411,6 +412,16 @@ return e.getSubject(); } + + /** + * This will only work for the BigdataGASState. + */ + @Override + public Literal getLinkAttr(final Value u, final Statement e) { + + return null; + + } @Override public boolean isEdge(final Statement e) { Modified: branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/graph/impl/bd/BigdataGASState.java =================================================================== --- branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/graph/impl/bd/BigdataGASState.java 2014-04-07 20:46:38 UTC (rev 8078) +++ branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/graph/impl/bd/BigdataGASState.java 2014-04-07 21:45:05 UTC (rev 8079) @@ -215,5 +215,39 @@ } + /** + * This will only work for the BigdataGASState. + */ + @Override + public Literal getLinkAttr(final Value u, final Statement e) { + + if (e.getObject() instanceof IV) { + + final IV iv = (IV) e.getObject(); + + if (iv.isLiteral()) { + + if (iv.isInline()) { + + return (Literal) iv; + + } else { + + return (Literal) iv.getValue(); + + } + + } + + } else if (e.getObject() instanceof Literal) { + + return (Literal) e.getObject(); + + } + + return null; + + } + } Modified: branches/RDR/bigdata-rdf/src/test/com/bigdata/rdf/graph/impl/bd/TestSSSP.java =================================================================== --- branches/RDR/bigdata-rdf/src/test/com/bigdata/rdf/graph/impl/bd/TestSSSP.java 2014-04-07 20:46:38 UTC (rev 8078) +++ branches/RDR/bigdata-rdf/src/test/com/bigdata/rdf/graph/impl/bd/TestSSSP.java 2014-04-07 21:45:05 UTC (rev 8079) @@ -69,13 +69,13 @@ // Converge. gasContext.call(); - assertEquals(0, gasState.getState(p.getMike()).dist()); + assertEquals(0.0, gasState.getState(p.getMike()).dist()); - assertEquals(1, gasState.getState(p.getFoafPerson()).dist()); + assertEquals(1.0, gasState.getState(p.getFoafPerson()).dist()); - assertEquals(1, gasState.getState(p.getBryan()).dist()); + assertEquals(1.0, gasState.getState(p.getBryan()).dist()); - assertEquals(2, gasState.getState(p.getMartyn()).dist()); + assertEquals(2.0, gasState.getState(p.getMartyn()).dist()); } finally { @@ -118,15 +118,15 @@ gasContext.call(); // check #of hops. - assertEquals(0, gasState.getState(p.getV1()).dist()); + assertEquals(0.0, gasState.getState(p.getV1()).dist()); - assertEquals(1, gasState.getState(p.getV2()).dist()); + assertEquals(1.0, gasState.getState(p.getV2()).dist()); - assertEquals(1, gasState.getState(p.getV3()).dist()); + assertEquals(1.0, gasState.getState(p.getV3()).dist()); - assertEquals(2, gasState.getState(p.getV4()).dist()); + assertEquals(2.0, gasState.getState(p.getV4()).dist()); - assertEquals(2, gasState.getState(p.getV5()).dist()); + assertEquals(2.0, gasState.getState(p.getV5()).dist()); } finally { @@ -176,15 +176,15 @@ gasContext.call(); // Check weighted distance. - assertEquals(0, gasState.getState(p.getV1()).dist()); + assertEquals(0.0, gasState.getState(p.getV1()).dist()); - assertEquals(100, gasState.getState(p.getV2()).dist()); + assertEquals(100.0, gasState.getState(p.getV2()).dist()); - assertEquals(100, gasState.getState(p.getV3()).dist()); + assertEquals(100.0, gasState.getState(p.getV3()).dist()); - assertEquals(125, gasState.getState(p.getV4()).dist()); + assertEquals(150.0, gasState.getState(p.getV4()).dist()); - assertEquals(125, gasState.getState(p.getV5()).dist()); + assertEquals(175.0, gasState.getState(p.getV5()).dist()); } finally { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mrp...@us...> - 2014-04-17 15:01:22
|
Revision: 8126 http://sourceforge.net/p/bigdata/code/8126 Author: mrpersonick Date: 2014-04-17 15:01:17 +0000 (Thu, 17 Apr 2014) Log Message: ----------- added an interface to allow service calls to bypass their normal hash index+join in the query plan Modified Paths: -------------- branches/RDR/bigdata/src/java/com/bigdata/bop/controller/ServiceCallJoin.java Added Paths: ----------- branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/service/IDoNotJoinService.java Modified: branches/RDR/bigdata/src/java/com/bigdata/bop/controller/ServiceCallJoin.java =================================================================== --- branches/RDR/bigdata/src/java/com/bigdata/bop/controller/ServiceCallJoin.java 2014-04-17 14:54:41 UTC (rev 8125) +++ branches/RDR/bigdata/src/java/com/bigdata/bop/controller/ServiceCallJoin.java 2014-04-17 15:01:17 UTC (rev 8126) @@ -58,6 +58,7 @@ import com.bigdata.rdf.model.BigdataURI; import com.bigdata.rdf.sparql.ast.service.BigdataServiceCall; import com.bigdata.rdf.sparql.ast.service.ExternalServiceCall; +import com.bigdata.rdf.sparql.ast.service.IDoNotJoinService; import com.bigdata.rdf.sparql.ast.service.RemoteServiceCall; import com.bigdata.rdf.sparql.ast.service.ServiceCall; import com.bigdata.rdf.sparql.ast.service.ServiceCallUtility; @@ -585,6 +586,52 @@ : new UnsyncLocalOutputBuffer<IBindingSet>( op.getChunkCapacity(), sink2); + if (serviceCall instanceof IDoNotJoinService) { + + // The iterator draining the subquery + ICloseableIterator<IBindingSet[]> serviceSolutionItr = null; + try { + + /* + * Invoke the service. + * + * Note: Returns [null] IFF SILENT and SERVICE ERROR. + */ + + serviceSolutionItr = doServiceCall(serviceCall, chunk); + + if (serviceSolutionItr != null) { + + while (serviceSolutionItr.hasNext()) { + + final IBindingSet[] bsets = + serviceSolutionItr.next(); + + for (IBindingSet bs : bsets) { + + unsyncBuffer.add(bs); + + } + + } + + } + + } finally { + + // ensure the service call iterator is closed. + if (serviceSolutionItr != null) + serviceSolutionItr.close(); + + } + + unsyncBuffer.flush(); + + // done. + return null; + + } + final JVMHashJoinUtility state = new JVMHashJoinUtility(op, silent ? JoinTypeEnum.Optional : JoinTypeEnum.Normal ); Added: branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/service/IDoNotJoinService.java =================================================================== --- branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/service/IDoNotJoinService.java (rev 0) +++ branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/service/IDoNotJoinService.java 2014-04-17 15:01:17 UTC (rev 8126) @@ -0,0 +1,35 @@ +/** + +Copyright (C) SYSTAP, LLC 2006-2014. All rights reserved. + +Contact: + SYSTAP, LLC + 4501 Tower Road + Greensboro, NC 27410 + lic...@bi... + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; version 2 of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +package com.bigdata.rdf.sparql.ast.service; + +/** + * Service calls can implement this interface and they will not be routed + * through a hash join in the query plan. They will be responsible for their + * own join internally. + * + * @author mikepersonick + */ +public interface IDoNotJoinService { + +} Property changes on: branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/service/IDoNotJoinService.java ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tho...@us...> - 2014-04-21 14:33:09
|
Revision: 8129 http://sourceforge.net/p/bigdata/code/8129 Author: thompsonbry Date: 2014-04-21 14:33:06 +0000 (Mon, 21 Apr 2014) Log Message: ----------- Rolling forward to jetty 9.1.4 for HA load balancer support. See #624 (HA Load Balancer) Modified Paths: -------------- branches/RDR/.classpath branches/RDR/build.properties branches/RDR/pom.xml Added Paths: ----------- branches/RDR/bigdata/lib/jetty/README.TXT branches/RDR/bigdata/lib/jetty/jetty-client-9.1.4.v20140401.jar branches/RDR/bigdata/lib/jetty/jetty-continuation-9.1.4.v20140401.jar branches/RDR/bigdata/lib/jetty/jetty-http-9.1.4.v20140401.jar branches/RDR/bigdata/lib/jetty/jetty-io-9.1.4.v20140401.jar branches/RDR/bigdata/lib/jetty/jetty-proxy-9.1.4.v20140401.jar branches/RDR/bigdata/lib/jetty/jetty-rewrite-9.1.4.v20140401.jar branches/RDR/bigdata/lib/jetty/jetty-security-9.1.4.v20140401.jar branches/RDR/bigdata/lib/jetty/jetty-server-9.1.4.v20140401.jar branches/RDR/bigdata/lib/jetty/jetty-servlet-9.1.4.v20140401.jar branches/RDR/bigdata/lib/jetty/jetty-util-9.1.4.v20140401.jar branches/RDR/bigdata/lib/jetty/jetty-webapp-9.1.4.v20140401.jar branches/RDR/bigdata/lib/jetty/jetty-xml-9.1.4.v20140401.jar Removed Paths: ------------- branches/RDR/bigdata/lib/jetty/jetty-client-9.1.3.v20140225.jar branches/RDR/bigdata/lib/jetty/jetty-continuation-9.1.3.v20140225.jar branches/RDR/bigdata/lib/jetty/jetty-http-9.1.3.v20140225.jar branches/RDR/bigdata/lib/jetty/jetty-io-9.1.3.v20140225.jar branches/RDR/bigdata/lib/jetty/jetty-proxy-9.1.3.v20140225.jar branches/RDR/bigdata/lib/jetty/jetty-rewrite-9.1.3.v20140225.jar branches/RDR/bigdata/lib/jetty/jetty-security-9.1.3.v20140225.jar branches/RDR/bigdata/lib/jetty/jetty-server-9.1.3.v20140225.jar branches/RDR/bigdata/lib/jetty/jetty-servlet-9.1.3.v20140225.jar branches/RDR/bigdata/lib/jetty/jetty-util-9.1.3.v20140225.jar branches/RDR/bigdata/lib/jetty/jetty-webapp-9.1.3.v20140225.jar branches/RDR/bigdata/lib/jetty/jetty-xml-9.1.3.v20140225.jar Modified: branches/RDR/.classpath =================================================================== --- branches/RDR/.classpath 2014-04-21 14:29:33 UTC (rev 8128) +++ branches/RDR/.classpath 2014-04-21 14:33:06 UTC (rev 8129) @@ -58,8 +58,7 @@ <classpathentry exported="true" kind="lib" path="bigdata/lib/unimi/fastutil-5.1.5.jar"/> <classpathentry exported="true" kind="lib" path="bigdata/lib/lucene/lucene-analyzers-3.0.0.jar"/> <classpathentry exported="true" kind="lib" path="bigdata/lib/lucene/lucene-core-3.0.0.jar"/> - <classpathentry kind="lib" path="bigdata/lib/jetty/jetty-client-9.1.3.v20140225.jar" sourcepath="/Users/bryan/Documents/workspace/org.eclipse.jetty.project-jetty-9.1-wsbatch"/> - <classpathentry kind="lib" path="bigdata-sails/lib/jackson-core-2.3.3-20140314.203554-3.jar"/> + <classpathentry exported="true" kind="lib" path="bigdata-sails/lib/jackson-core-2.3.3-20140314.203554-3.jar"/> <classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry exported="true" kind="lib" path="bigdata/lib/high-scale-lib-v1.1.2.jar"/> <classpathentry exported="true" kind="lib" path="bigdata/lib/junit-ext-1.1-b3-dev.jar"/> @@ -79,16 +78,17 @@ <classpathentry exported="true" kind="lib" path="bigdata-sails/lib/sesame-sparql-testsuite-2.6.10.jar"/> <classpathentry exported="true" kind="lib" path="bigdata-sails/lib/sesame-store-testsuite-2.6.10.jar"/> <classpathentry exported="true" kind="lib" path="bigdata-rdf/lib/nxparser-1.2.3.jar"/> - <classpathentry exported="true" kind="lib" path="bigdata/lib/jetty/jetty-continuation-9.1.3.v20140225.jar"/> - <classpathentry exported="true" kind="lib" path="bigdata/lib/jetty/jetty-http-9.1.3.v20140225.jar"/> - <classpathentry exported="true" kind="lib" path="bigdata/lib/jetty/jetty-io-9.1.3.v20140225.jar"/> - <classpathentry exported="true" kind="lib" path="bigdata/lib/jetty/jetty-proxy-9.1.3.v20140225.jar" sourcepath="/Users/bryan/Documents/workspace/org.eclipse.jetty.project-jetty-9.1-wsbatch"/> - <classpathentry exported="true" kind="lib" path="bigdata/lib/jetty/jetty-rewrite-9.1.3.v20140225.jar"/> - <classpathentry exported="true" kind="lib" path="bigdata/lib/jetty/jetty-security-9.1.3.v20140225.jar"/> - <classpathentry exported="true" kind="lib" path="bigdata/lib/jetty/jetty-server-9.1.3.v20140225.jar" sourcepath="/Users/bryan/Documents/workspace/org.eclipse.jetty.project-jetty-9.1-wsbatch"/> - <classpathentry exported="true" kind="lib" path="bigdata/lib/jetty/jetty-servlet-9.1.3.v20140225.jar" sourcepath="/Users/bryan/Documents/workspace/org.eclipse.jetty.project-jetty-9.1-wsbatch"/> - <classpathentry exported="true" kind="lib" path="bigdata/lib/jetty/jetty-util-9.1.3.v20140225.jar" sourcepath="/Users/bryan/Documents/workspace/org.eclipse.jetty.project-jetty-9.1-wsbatch"/> - <classpathentry exported="true" kind="lib" path="bigdata/lib/jetty/jetty-webapp-9.1.3.v20140225.jar"/> - <classpathentry exported="true" kind="lib" path="bigdata/lib/jetty/jetty-xml-9.1.3.v20140225.jar"/> + <classpathentry exported="true" kind="lib" path="bigdata/lib/jetty/jetty-client-9.1.4.v20140401.jar"/> + <classpathentry exported="true" kind="lib" path="bigdata/lib/jetty/jetty-continuation-9.1.4.v20140401.jar"/> + <classpathentry exported="true" kind="lib" path="bigdata/lib/jetty/jetty-http-9.1.4.v20140401.jar"/> + <classpathentry exported="true" kind="lib" path="bigdata/lib/jetty/jetty-io-9.1.4.v20140401.jar"/> + <classpathentry exported="true" kind="lib" path="bigdata/lib/jetty/jetty-proxy-9.1.4.v20140401.jar" sourcepath="/Users/bryan/Downloads/org.eclipse.jetty.project-jetty-9.1.4.v20140401"/> + <classpathentry exported="true" kind="lib" path="bigdata/lib/jetty/jetty-rewrite-9.1.4.v20140401.jar"/> + <classpathentry exported="true" kind="lib" path="bigdata/lib/jetty/jetty-security-9.1.4.v20140401.jar"/> + <classpathentry exported="true" kind="lib" path="bigdata/lib/jetty/jetty-server-9.1.4.v20140401.jar"/> + <classpathentry exported="true" kind="lib" path="bigdata/lib/jetty/jetty-servlet-9.1.4.v20140401.jar"/> + <classpathentry exported="true" kind="lib" path="bigdata/lib/jetty/jetty-util-9.1.4.v20140401.jar"/> + <classpathentry exported="true" kind="lib" path="bigdata/lib/jetty/jetty-webapp-9.1.4.v20140401.jar"/> + <classpathentry exported="true" kind="lib" path="bigdata/lib/jetty/jetty-xml-9.1.4.v20140401.jar"/> <classpathentry kind="output" path="bin"/> </classpath> Added: branches/RDR/bigdata/lib/jetty/README.TXT =================================================================== --- branches/RDR/bigdata/lib/jetty/README.TXT (rev 0) +++ branches/RDR/bigdata/lib/jetty/README.TXT 2014-04-21 14:33:06 UTC (rev 8129) @@ -0,0 +1,7 @@ +You can download the jetty source from: + +http://git.eclipse.org/c/jetty/org.eclipse.jetty.project.git/ + +You can download the jetty binary distributions from: + +http://download.eclipse.org/jetty/ Deleted: branches/RDR/bigdata/lib/jetty/jetty-client-9.1.3.v20140225.jar =================================================================== (Binary files differ) Added: branches/RDR/bigdata/lib/jetty/jetty-client-9.1.4.v20140401.jar =================================================================== (Binary files differ) Index: branches/RDR/bigdata/lib/jetty/jetty-client-9.1.4.v20140401.jar =================================================================== --- branches/RDR/bigdata/lib/jetty/jetty-client-9.1.4.v20140401.jar 2014-04-21 14:29:33 UTC (rev 8128) +++ branches/RDR/bigdata/lib/jetty/jetty-client-9.1.4.v20140401.jar 2014-04-21 14:33:06 UTC (rev 8129) Property changes on: branches/RDR/bigdata/lib/jetty/jetty-client-9.1.4.v20140401.jar ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Deleted: branches/RDR/bigdata/lib/jetty/jetty-continuation-9.1.3.v20140225.jar =================================================================== (Binary files differ) Added: branches/RDR/bigdata/lib/jetty/jetty-continuation-9.1.4.v20140401.jar =================================================================== (Binary files differ) Index: branches/RDR/bigdata/lib/jetty/jetty-continuation-9.1.4.v20140401.jar =================================================================== --- branches/RDR/bigdata/lib/jetty/jetty-continuation-9.1.4.v20140401.jar 2014-04-21 14:29:33 UTC (rev 8128) +++ branches/RDR/bigdata/lib/jetty/jetty-continuation-9.1.4.v20140401.jar 2014-04-21 14:33:06 UTC (rev 8129) Property changes on: branches/RDR/bigdata/lib/jetty/jetty-continuation-9.1.4.v20140401.jar ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Deleted: branches/RDR/bigdata/lib/jetty/jetty-http-9.1.3.v20140225.jar =================================================================== (Binary files differ) Added: branches/RDR/bigdata/lib/jetty/jetty-http-9.1.4.v20140401.jar =================================================================== (Binary files differ) Index: branches/RDR/bigdata/lib/jetty/jetty-http-9.1.4.v20140401.jar =================================================================== --- branches/RDR/bigdata/lib/jetty/jetty-http-9.1.4.v20140401.jar 2014-04-21 14:29:33 UTC (rev 8128) +++ branches/RDR/bigdata/lib/jetty/jetty-http-9.1.4.v20140401.jar 2014-04-21 14:33:06 UTC (rev 8129) Property changes on: branches/RDR/bigdata/lib/jetty/jetty-http-9.1.4.v20140401.jar ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Deleted: branches/RDR/bigdata/lib/jetty/jetty-io-9.1.3.v20140225.jar =================================================================== (Binary files differ) Added: branches/RDR/bigdata/lib/jetty/jetty-io-9.1.4.v20140401.jar =================================================================== (Binary files differ) Index: branches/RDR/bigdata/lib/jetty/jetty-io-9.1.4.v20140401.jar =================================================================== --- branches/RDR/bigdata/lib/jetty/jetty-io-9.1.4.v20140401.jar 2014-04-21 14:29:33 UTC (rev 8128) +++ branches/RDR/bigdata/lib/jetty/jetty-io-9.1.4.v20140401.jar 2014-04-21 14:33:06 UTC (rev 8129) Property changes on: branches/RDR/bigdata/lib/jetty/jetty-io-9.1.4.v20140401.jar ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Deleted: branches/RDR/bigdata/lib/jetty/jetty-proxy-9.1.3.v20140225.jar =================================================================== (Binary files differ) Added: branches/RDR/bigdata/lib/jetty/jetty-proxy-9.1.4.v20140401.jar =================================================================== (Binary files differ) Index: branches/RDR/bigdata/lib/jetty/jetty-proxy-9.1.4.v20140401.jar =================================================================== --- branches/RDR/bigdata/lib/jetty/jetty-proxy-9.1.4.v20140401.jar 2014-04-21 14:29:33 UTC (rev 8128) +++ branches/RDR/bigdata/lib/jetty/jetty-proxy-9.1.4.v20140401.jar 2014-04-21 14:33:06 UTC (rev 8129) Property changes on: branches/RDR/bigdata/lib/jetty/jetty-proxy-9.1.4.v20140401.jar ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Deleted: branches/RDR/bigdata/lib/jetty/jetty-rewrite-9.1.3.v20140225.jar =================================================================== (Binary files differ) Added: branches/RDR/bigdata/lib/jetty/jetty-rewrite-9.1.4.v20140401.jar =================================================================== (Binary files differ) Index: branches/RDR/bigdata/lib/jetty/jetty-rewrite-9.1.4.v20140401.jar =================================================================== --- branches/RDR/bigdata/lib/jetty/jetty-rewrite-9.1.4.v20140401.jar 2014-04-21 14:29:33 UTC (rev 8128) +++ branches/RDR/bigdata/lib/jetty/jetty-rewrite-9.1.4.v20140401.jar 2014-04-21 14:33:06 UTC (rev 8129) Property changes on: branches/RDR/bigdata/lib/jetty/jetty-rewrite-9.1.4.v20140401.jar ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Deleted: branches/RDR/bigdata/lib/jetty/jetty-security-9.1.3.v20140225.jar =================================================================== (Binary files differ) Added: branches/RDR/bigdata/lib/jetty/jetty-security-9.1.4.v20140401.jar =================================================================== (Binary files differ) Index: branches/RDR/bigdata/lib/jetty/jetty-security-9.1.4.v20140401.jar =================================================================== --- branches/RDR/bigdata/lib/jetty/jetty-security-9.1.4.v20140401.jar 2014-04-21 14:29:33 UTC (rev 8128) +++ branches/RDR/bigdata/lib/jetty/jetty-security-9.1.4.v20140401.jar 2014-04-21 14:33:06 UTC (rev 8129) Property changes on: branches/RDR/bigdata/lib/jetty/jetty-security-9.1.4.v20140401.jar ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Deleted: branches/RDR/bigdata/lib/jetty/jetty-server-9.1.3.v20140225.jar =================================================================== (Binary files differ) Added: branches/RDR/bigdata/lib/jetty/jetty-server-9.1.4.v20140401.jar =================================================================== (Binary files differ) Index: branches/RDR/bigdata/lib/jetty/jetty-server-9.1.4.v20140401.jar =================================================================== --- branches/RDR/bigdata/lib/jetty/jetty-server-9.1.4.v20140401.jar 2014-04-21 14:29:33 UTC (rev 8128) +++ branches/RDR/bigdata/lib/jetty/jetty-server-9.1.4.v20140401.jar 2014-04-21 14:33:06 UTC (rev 8129) Property changes on: branches/RDR/bigdata/lib/jetty/jetty-server-9.1.4.v20140401.jar ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Deleted: branches/RDR/bigdata/lib/jetty/jetty-servlet-9.1.3.v20140225.jar =================================================================== (Binary files differ) Added: branches/RDR/bigdata/lib/jetty/jetty-servlet-9.1.4.v20140401.jar =================================================================== (Binary files differ) Index: branches/RDR/bigdata/lib/jetty/jetty-servlet-9.1.4.v20140401.jar =================================================================== --- branches/RDR/bigdata/lib/jetty/jetty-servlet-9.1.4.v20140401.jar 2014-04-21 14:29:33 UTC (rev 8128) +++ branches/RDR/bigdata/lib/jetty/jetty-servlet-9.1.4.v20140401.jar 2014-04-21 14:33:06 UTC (rev 8129) Property changes on: branches/RDR/bigdata/lib/jetty/jetty-servlet-9.1.4.v20140401.jar ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Deleted: branches/RDR/bigdata/lib/jetty/jetty-util-9.1.3.v20140225.jar =================================================================== (Binary files differ) Added: branches/RDR/bigdata/lib/jetty/jetty-util-9.1.4.v20140401.jar =================================================================== (Binary files differ) Index: branches/RDR/bigdata/lib/jetty/jetty-util-9.1.4.v20140401.jar =================================================================== --- branches/RDR/bigdata/lib/jetty/jetty-util-9.1.4.v20140401.jar 2014-04-21 14:29:33 UTC (rev 8128) +++ branches/RDR/bigdata/lib/jetty/jetty-util-9.1.4.v20140401.jar 2014-04-21 14:33:06 UTC (rev 8129) Property changes on: branches/RDR/bigdata/lib/jetty/jetty-util-9.1.4.v20140401.jar ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Deleted: branches/RDR/bigdata/lib/jetty/jetty-webapp-9.1.3.v20140225.jar =================================================================== (Binary files differ) Added: branches/RDR/bigdata/lib/jetty/jetty-webapp-9.1.4.v20140401.jar =================================================================== (Binary files differ) Index: branches/RDR/bigdata/lib/jetty/jetty-webapp-9.1.4.v20140401.jar =================================================================== --- branches/RDR/bigdata/lib/jetty/jetty-webapp-9.1.4.v20140401.jar 2014-04-21 14:29:33 UTC (rev 8128) +++ branches/RDR/bigdata/lib/jetty/jetty-webapp-9.1.4.v20140401.jar 2014-04-21 14:33:06 UTC (rev 8129) Property changes on: branches/RDR/bigdata/lib/jetty/jetty-webapp-9.1.4.v20140401.jar ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Deleted: branches/RDR/bigdata/lib/jetty/jetty-xml-9.1.3.v20140225.jar =================================================================== (Binary files differ) Added: branches/RDR/bigdata/lib/jetty/jetty-xml-9.1.4.v20140401.jar =================================================================== (Binary files differ) Index: branches/RDR/bigdata/lib/jetty/jetty-xml-9.1.4.v20140401.jar =================================================================== --- branches/RDR/bigdata/lib/jetty/jetty-xml-9.1.4.v20140401.jar 2014-04-21 14:29:33 UTC (rev 8128) +++ branches/RDR/bigdata/lib/jetty/jetty-xml-9.1.4.v20140401.jar 2014-04-21 14:33:06 UTC (rev 8129) Property changes on: branches/RDR/bigdata/lib/jetty/jetty-xml-9.1.4.v20140401.jar ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Modified: branches/RDR/build.properties =================================================================== --- branches/RDR/build.properties 2014-04-21 14:29:33 UTC (rev 8128) +++ branches/RDR/build.properties 2014-04-21 14:33:06 UTC (rev 8129) @@ -49,7 +49,7 @@ zookeeper.version=3.4.5 sesame.version=2.6.10 slf4j.version=1.6.1 -jetty.version=9.1.3.v20140225 +jetty.version=9.1.4.v20140401 #jetty.version=7.2.2.v20101205 #servlet.version=2.5 servlet.version=3.1.0 Modified: branches/RDR/pom.xml =================================================================== --- branches/RDR/pom.xml 2014-04-21 14:29:33 UTC (rev 8128) +++ branches/RDR/pom.xml 2014-04-21 14:33:06 UTC (rev 8129) @@ -78,7 +78,7 @@ <zookeeper.version>3.3.3</zookeeper.version> <sesame.version>2.6.10</sesame.version> <slf4j.version>1.6.1</slf4j.version> - <jetty.version>9.1.3.v20140225</jetty.version> + <jetty.version>9.1.4.v20140401</jetty.version> <!--jetty.version>7.2.2.v20101205</jetty.version--> <servlet.version>3.1.0</servlet.version> <lucene.version>3.0.0</lucene.version> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tho...@us...> - 2014-04-21 20:59:42
|
Revision: 8133 http://sourceforge.net/p/bigdata/code/8133 Author: thompsonbry Date: 2014-04-21 20:59:35 +0000 (Mon, 21 Apr 2014) Log Message: ----------- Merging in changes from the main development branch into the RDR branch. {{{ merge https://svn.code.sf.net/p/bigdata/code/branches/BIGDATA_RELEASE_1_3_0 /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA5JournalServer.java U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-jini/src/test/com/bigdata/journal/jini/ha/StressTestHA3JournalServer.java U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestAll.java A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA1SnapshotPolicy.java U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-jini/src/test/com/bigdata/journal/jini/ha/AbstractHA3JournalServerTestCase.java A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-jini/src/test/com/bigdata/journal/jini/ha/AbstractHA5JournalServerTestCase.java U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-jini/src/test/com/bigdata/journal/jini/ha/AbstractHA3BackupTestCase.java R /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-jini/src/test/com/bigdata/journal/jini/ha/log4j-template-B.properties A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-jini/src/test/com/bigdata/journal/jini/ha/log4j-template-D.properties A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-jini/src/test/com/bigdata/journal/jini/ha/HAJournal-D.config A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHANamespace.java U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-jini/src/test/com/bigdata/journal/jini/ha/zkClient.config A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA3CancelQuery.java R /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-jini/src/test/com/bigdata/journal/jini/ha/log4j-template-A.properties R /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-jini/src/test/com/bigdata/journal/jini/ha/log4j-template-C.properties A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-jini/src/test/com/bigdata/journal/jini/ha/log4j-template-E.properties A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA5JournalServerWithHALogs.java A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-jini/src/test/com/bigdata/journal/jini/ha/HAJournal-E.config C /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-jini/src/test/com/bigdata/journal/jini/ha/AbstractHAJournalServerTestCase.java A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA1SnapshotPolicy2.java A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA1JournalServer.java U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA3JournalServer.java U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-jini/src/test/com/bigdata/journal/jini/ha --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-jini/src/java/com/bigdata/disco G /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-jini/src/java/com/bigdata/disco --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-jini/src/java/com/bigdata/attr G /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-jini/src/java/com/bigdata/attr --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE C /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-jini/src/java/com/bigdata/journal/jini/ha/HAJournalServer.java U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-jini/src/java/com/bigdata/journal/jini/ha/SnapshotManager.java U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-jini/src/java/com/bigdata/journal/jini/ha/HARestore.java --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-jini/src/java/com/bigdata/util/config G /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-jini/src/java/com/bigdata/util/config --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-perf/lubm G /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-perf/lubm --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-perf/uniprot/src G /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-perf/uniprot/src --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-perf/uniprot G /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-perf/uniprot --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-perf/btc/src/resources G /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-perf/btc/src/resources --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-perf/btc G /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-perf/btc --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-perf G /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-perf --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/src/resources/HAJournal/HAJournal.config --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/src/resources/bin/config G /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/src/resources/bin/config --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/src/resources/bin/startHAServices A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/src/resources/bin/HARestore A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/src/resources/etc/default A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/src/resources/etc/default/bigdataHA A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/src/resources/etc/default/bigdata U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/src/resources/etc/init.d/bigdataHA D /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/src/resources/etc/bigdata --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/lib/jetty G /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/lib/jetty --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/test/com/bigdata/bop/joinGraph G /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/test/com/bigdata/bop/joinGraph --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/test/com/bigdata/bop/util G /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/test/com/bigdata/bop/util --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/test/com/bigdata/jsr166 G /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/test/com/bigdata/jsr166 --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/test/com/bigdata/service/ndx/pipeline/TestMasterTaskWithSplits.java U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/test/com/bigdata/service/ndx/pipeline/TestMasterTaskWithRedirect.java U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/test/com/bigdata/btree/data/AbstractNodeDataRecordTestCase.java U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/test/com/bigdata/cache/StressTestGlobalLRU.java U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/test/com/bigdata/io/writecache/TestWORMWriteCacheService.java U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/test/com/bigdata/io/writecache/TestRWWriteCacheService.java --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/test/com/bigdata/util/httpd G /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/test/com/bigdata/util/httpd --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/java/com/bigdata/search/FullTextIndex.java U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/java/com/bigdata/search/ReadIndexTask.java U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/java/com/bigdata/bop/solutions/MemoryGroupByOp.java --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/java/com/bigdata/bop/aggregate G /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/java/com/bigdata/bop/aggregate --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/java/com/bigdata/bop/engine/QueryEngine.java --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/java/com/bigdata/bop/util G /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/java/com/bigdata/bop/util --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/java/com/bigdata/bop/joinGraph G /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/java/com/bigdata/bop/joinGraph --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/java/com/bigdata/bop/join/PipelineJoin.java --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/java/com/bigdata/jsr166 G /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/java/com/bigdata/jsr166 --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/java/com/bigdata/sparse/GlobalRowStoreHelper.java U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/java/com/bigdata/service/proxy/ClientAsynchronousIterator.java U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/java/com/bigdata/service/ndx/pipeline/AbstractSubtask.java U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/java/com/bigdata/btree/AbstractBTree.java U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/java/com/bigdata/btree/PageStats.java U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/java/com/bigdata/btree/data/DefaultNodeCoder.java U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/java/com/bigdata/counters/ProcessReaderHelper.java U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/java/com/bigdata/counters/win/TypeperfCollector.java U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/java/com/bigdata/rwstore/FixedAllocator.java U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/java/com/bigdata/rwstore/RWStore.java U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/java/com/bigdata/rwstore/RWWriteCacheService.java U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/java/com/bigdata/io/writecache/WriteCacheService.java U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/java/com/bigdata/io/writecache/BufferedWrite.java U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/java/com/bigdata/io/writecache/WriteCache.java --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/java/com/bigdata/htree/raba G /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/java/com/bigdata/htree/raba --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/java/com/bigdata/journal/DumpJournal.java U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/java/com/bigdata/journal/WORMStrategy.java U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/java/com/bigdata/journal/RWStrategy.java U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/java/com/bigdata/journal/AbstractJournal.java U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/java/com/bigdata/resources/AsynchronousOverflowTask.java U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/java/com/bigdata/util/CSVReader.java A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/Vagrantfile A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/files A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/files/default A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/files/default/test A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/files/default/test/default_test.rb A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/metadata.rb A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/CHANGELOG.txt A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/Berksfile A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/attributes A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/attributes/default.rb A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/Gemfile A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/bin A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/bin/createSecurityGroup.py A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/bin/setHosts.py A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/bin/createCluster.sh A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/chefignore A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/recipes A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/recipes/default.rb A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/recipes/java7.rb A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/recipes/ssd.rb A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/README.txt A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/Thorfile A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/aws.rc A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/templates A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/templates/default A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/templates/default/default A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/templates/default/default/bigdataHA.erb A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/templates/default/init.d A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/templates/default/init.d/bigdataHA.erb A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/templates/default/jetty.xml.erb A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/templates/default/log4jHA.properties.erb A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/templates/default/zoo.cfg.erb --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/lgpl-utils/src/test/it/unimi/dsi/fastutil/bytes/custom G /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/lgpl-utils/src/test/it/unimi/dsi/fastutil/bytes/custom --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/lgpl-utils/src/java/it/unimi/dsi/fastutil/bytes/custom G /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/lgpl-utils/src/java/it/unimi/dsi/fastutil/bytes/custom --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/build.xml --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/osgi G /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/osgi --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-compatibility G /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-compatibility --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-sails/src/test/com/bigdata/rdf/sail/831.ttl --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-sails/src/test/com/bigdata/rdf/sail/bench G /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-sails/src/test/com/bigdata/rdf/sail/bench --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-sails/src/test/com/bigdata/rdf/sail/874.ttl A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-sails/src/test/com/bigdata/rdf/sail/831.rq A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-sails/src/test/com/bigdata/rdf/sail/StressTest_ClosedByInterrupt_RW.java --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-sails/src/test/com/bigdata/rdf/sail/webapp G /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-sails/src/test/com/bigdata/rdf/sail/webapp --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-sails/src/test/com/bigdata/rdf/sail/874.rq --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-sails/src/java/com/bigdata/rdf/sail/bench G /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-sails/src/java/com/bigdata/rdf/sail/bench --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/SD.java U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/BigdataRDFServletContextListener.java C /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/MultiTenancyServlet.java U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/StatusServlet.java C /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/BigdataRDFContext.java C /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/client/RemoteRepository.java G /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-sails/src/java/com/bigdata/rdf/sail/changesets G /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-sails/src/java/com/bigdata/rdf/sail/changesets --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-rdf/src/test/com/bigdata/bop/rdf/aggregate G /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-rdf/src/test/com/bigdata/bop/rdf/aggregate --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/named-graphs-ticket-888b.rq A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_831.srx A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_874.srx A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/count_distinct_emptyResult.trig A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_874.rq U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestNamedGraphs.java A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_831.ttl A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_874.ttl A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/count_distinct_emptyResult.srx A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/count_emptyResult.rq U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestUnions.java A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_831.rq A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/named-graphs-ticket-888.trig A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/named-graphs-ticket-888.srx A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/count_emptyResult.trig A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_874b.rq U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestAggregationQuery.java A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/count_emptyResult.srx A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/named-graphs-ticket-888.rq A /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/count_distinct_emptyResult.rq --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-rdf/src/test/com/bigdata/rdf/internal G /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-rdf/src/test/com/bigdata/rdf/internal --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-rdf/src/test/com/bigdata/rdf/relation G /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-rdf/src/test/com/bigdata/rdf/relation --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-rdf/src/java/com/bigdata/bop/rdf/aggregate G /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-rdf/src/java/com/bigdata/bop/rdf/aggregate --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-rdf/src/java/com/bigdata/rdf/changesets G /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-rdf/src/java/com/bigdata/rdf/changesets --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-rdf/src/java/com/bigdata/rdf/error G /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-rdf/src/java/com/bigdata/rdf/error --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-rdf/src/java/com/bigdata/rdf/store/BDS.java U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/eval/ASTEvalHelper.java U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/eval/SearchServiceFactory.java U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/eval/ASTSearchOptimizer.java U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/optimizers/ASTBindingAssigner.java --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-rdf/src/java/com/bigdata/rdf/internal G /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-rdf/src/java/com/bigdata/rdf/internal --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-rdf/src/java/com/bigdata/rdf/relation G /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-rdf/src/java/com/bigdata/rdf/relation --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-rdf/src/java/com/bigdata/rdf/util G /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-rdf/src/java/com/bigdata/rdf/util --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-rdf/src/samples G /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-rdf/src/samples --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/dsi-utils/LEGAL G /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/dsi-utils/LEGAL --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/dsi-utils/lib G /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/dsi-utils/lib --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/dsi-utils/src/test/it/unimi/dsi G /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/dsi-utils/src/test/it/unimi/dsi --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/dsi-utils/src/test/it/unimi G /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/dsi-utils/src/test/it/unimi --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/dsi-utils/src/test G /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/dsi-utils/src/test --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/dsi-utils/src/java/it/unimi G /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/dsi-utils/src/java/it/unimi --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/dsi-utils/src/java/it G /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/dsi-utils/src/java/it --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/dsi-utils/src/java G /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/dsi-utils/src/java --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/dsi-utils/src G /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/dsi-utils/src --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/dsi-utils G /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/dsi-utils --- Merging r7913 through r8131 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE G /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE Merge complete. ===== File Statistics: ===== Deleted: 4 Added: 74 Updated: 54 ==== Property Statistics: ===== Merged: 50 Updated: 1 ==== Conflict Statistics: ===== File conflicts: 5 }}} I am working to reconcile the conflicts and validate the merge... ---- The file conflicts were: {{{ C /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-jini/src/java/com/bigdata/journal/jini/ha/HAJournalServer.java C /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-jini/src/test/com/bigdata/journal/jini/ha/AbstractHAJournalServerTestCase.java C /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/MultiTenancyServlet.java C /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/BigdataRDFContext.java C /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/client/RemoteRepository.java }}} HAJournalServer: Resolved conflict in getNSSPort(). AbstractHAJournalServerTestCase: Resolved conflict in generation of the URL of the end point. MultiTenancyServlet: Resolved a conflict around transaction protection for the description of the graphs and the refactor to parameterize the graph description request in support of the new workbench. BigdataRDFContext: Conflict on imports. getKBInfo() was removed in the main branch. RemoteRepository: Resolved conflicts around use of log.warn() for IOException (versus ignoring the problem). ---- I have run through the NSS test suite, the AST test suite, and the QUADS mode SAIL test suite. Things look good. Committing to CI. See #526 (RDR) Revision Links: -------------- http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 http://sourceforge.net/p/bigdata/code/7913 http://sourceforge.net/p/bigdata/code/8131 Modified Paths: -------------- branches/RDR/bigdata/src/java/com/bigdata/bop/engine/QueryEngine.java branches/RDR/bigdata/src/java/com/bigdata/bop/join/PipelineJoin.java branches/RDR/bigdata/src/java/com/bigdata/bop/solutions/MemoryGroupByOp.java branches/RDR/bigdata/src/java/com/bigdata/btree/AbstractBTree.java branches/RDR/bigdata/src/java/com/bigdata/btree/PageStats.java branches/RDR/bigdata/src/java/com/bigdata/btree/data/DefaultNodeCoder.java branches/RDR/bigdata/src/java/com/bigdata/counters/ProcessReaderHelper.java branches/RDR/bigdata/src/java/com/bigdata/counters/win/TypeperfCollector.java branches/RDR/bigdata/src/java/com/bigdata/io/writecache/BufferedWrite.java branches/RDR/bigdata/src/java/com/bigdata/io/writecache/WriteCache.java branches/RDR/bigdata/src/java/com/bigdata/io/writecache/WriteCacheService.java branches/RDR/bigdata/src/java/com/bigdata/journal/AbstractJournal.java branches/RDR/bigdata/src/java/com/bigdata/journal/DumpJournal.java branches/RDR/bigdata/src/java/com/bigdata/journal/RWStrategy.java branches/RDR/bigdata/src/java/com/bigdata/journal/WORMStrategy.java branches/RDR/bigdata/src/java/com/bigdata/resources/AsynchronousOverflowTask.java branches/RDR/bigdata/src/java/com/bigdata/rwstore/FixedAllocator.java branches/RDR/bigdata/src/java/com/bigdata/rwstore/RWStore.java branches/RDR/bigdata/src/java/com/bigdata/rwstore/RWWriteCacheService.java branches/RDR/bigdata/src/java/com/bigdata/search/FullTextIndex.java branches/RDR/bigdata/src/java/com/bigdata/search/ReadIndexTask.java branches/RDR/bigdata/src/java/com/bigdata/service/ndx/pipeline/AbstractSubtask.java branches/RDR/bigdata/src/java/com/bigdata/service/proxy/ClientAsynchronousIterator.java branches/RDR/bigdata/src/java/com/bigdata/sparse/GlobalRowStoreHelper.java branches/RDR/bigdata/src/java/com/bigdata/util/CSVReader.java branches/RDR/bigdata/src/test/com/bigdata/btree/data/AbstractNodeDataRecordTestCase.java branches/RDR/bigdata/src/test/com/bigdata/cache/StressTestGlobalLRU.java branches/RDR/bigdata/src/test/com/bigdata/io/writecache/TestRWWriteCacheService.java branches/RDR/bigdata/src/test/com/bigdata/io/writecache/TestWORMWriteCacheService.java branches/RDR/bigdata/src/test/com/bigdata/service/ndx/pipeline/TestMasterTaskWithRedirect.java branches/RDR/bigdata/src/test/com/bigdata/service/ndx/pipeline/TestMasterTaskWithSplits.java branches/RDR/bigdata-jini/src/java/com/bigdata/journal/jini/ha/HARestore.java branches/RDR/bigdata-jini/src/java/com/bigdata/journal/jini/ha/SnapshotManager.java branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/AbstractHA3BackupTestCase.java branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/AbstractHA3JournalServerTestCase.java branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/AbstractHAJournalServerTestCase.java branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/StressTestHA3JournalServer.java branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestAll.java branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA3JournalServer.java branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/zkClient.config branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/eval/ASTEvalHelper.java branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/eval/ASTSearchOptimizer.java branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/eval/SearchServiceFactory.java branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/optimizers/ASTBindingAssigner.java branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/store/BDS.java branches/RDR/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestAggregationQuery.java branches/RDR/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestNamedGraphs.java branches/RDR/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestUnions.java branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/BigdataRDFContext.java branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/BigdataRDFServletContextListener.java branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/MultiTenancyServlet.java branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/SD.java branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/StatusServlet.java branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/client/RemoteRepository.java branches/RDR/build.xml branches/RDR/src/resources/HAJournal/HAJournal.config branches/RDR/src/resources/bin/startHAServices branches/RDR/src/resources/etc/init.d/bigdataHA Added Paths: ----------- branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/ branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/Berksfile branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/CHANGELOG.txt branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/Gemfile branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/README.txt branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/Thorfile branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/Vagrantfile branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/attributes/ branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/attributes/default.rb branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/aws.rc branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/bin/ branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/bin/createCluster.sh branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/bin/createSecurityGroup.py branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/bin/setHosts.py branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/chefignore branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/files/ branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/files/default/ branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/files/default/test/ branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/files/default/test/default_test.rb branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/metadata.rb branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/recipes/ branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/recipes/default.rb branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/recipes/java7.rb branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/recipes/ssd.rb branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/templates/ branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/templates/default/ branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/templates/default/default/ branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/templates/default/default/bigdataHA.erb branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/templates/default/init.d/ branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/templates/default/init.d/bigdataHA.erb branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/templates/default/jetty.xml.erb branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/templates/default/log4jHA.properties.erb branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/templates/default/zoo.cfg.erb branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/AbstractHA5JournalServerTestCase.java branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/HAJournal-D.config branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/HAJournal-E.config branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA1JournalServer.java branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA1SnapshotPolicy.java branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA1SnapshotPolicy2.java branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA3CancelQuery.java branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA5JournalServer.java branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA5JournalServerWithHALogs.java branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHANamespace.java branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/log4j-template-A.properties branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/log4j-template-B.properties branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/log4j-template-C.properties branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/log4j-template-D.properties branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/log4j-template-E.properties branches/RDR/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/count_distinct_emptyResult.rq branches/RDR/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/count_distinct_emptyResult.srx branches/RDR/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/count_distinct_emptyResult.trig branches/RDR/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/count_emptyResult.rq branches/RDR/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/count_emptyResult.srx branches/RDR/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/count_emptyResult.trig branches/RDR/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/named-graphs-ticket-888.rq branches/RDR/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/named-graphs-ticket-888.srx branches/RDR/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/named-graphs-ticket-888.trig branches/RDR/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/named-graphs-ticket-888b.rq branches/RDR/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_831.rq branches/RDR/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_831.srx branches/RDR/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_831.ttl branches/RDR/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_874.rq branches/RDR/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_874.srx branches/RDR/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_874.ttl branches/RDR/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_874b.rq branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/831.rq branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/831.ttl branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/874.rq branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/874.ttl branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/StressTest_ClosedByInterrupt_RW.java branches/RDR/src/resources/bin/HARestore branches/RDR/src/resources/etc/default/ branches/RDR/src/resources/etc/default/bigdata/ branches/RDR/src/resources/etc/default/bigdataHA Removed Paths: ------------- branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/Berksfile branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/CHANGELOG.txt branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/Gemfile branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/README.txt branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/Thorfile branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/Vagrantfile branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/attributes/ branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/attributes/default.rb branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/aws.rc branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/bin/ branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/bin/createCluster.sh branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/bin/createSecurityGroup.py branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/bin/setHosts.py branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/chefignore branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/files/ branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/files/default/ branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/files/default/test/ branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/files/default/test/default_test.rb branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/metadata.rb branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/recipes/ branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/recipes/default.rb branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/recipes/java7.rb branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/recipes/ssd.rb branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/templates/ branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/templates/default/ branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/templates/default/default/ branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/templates/default/default/bigdataHA.erb branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/templates/default/init.d/ branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/templates/default/init.d/bigdataHA.erb branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/templates/default/jetty.xml.erb branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/templates/default/log4jHA.properties.erb branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/templates/default/zoo.cfg.erb branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/log4j-template-A.properties branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/log4j-template-B.properties branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/log4j-template-C.properties branches/RDR/src/resources/etc/bigdata/ branches/RDR/src/resources/etc/default/bigdata/ branches/RDR/src/resources/etc/default/bigdataHA Property Changed: ---------------- branches/RDR/bigdata/lib/jetty/ branches/RDR/bigdata/src/java/com/bigdata/bop/aggregate/ branches/RDR/bigdata/src/java/com/bigdata/bop/joinGraph/ branches/RDR/bigdata/src/java/com/bigdata/bop/util/ branches/RDR/bigdata/src/java/com/bigdata/htree/raba/ branches/RDR/bigdata/src/java/com/bigdata/jsr166/ branches/RDR/bigdata/src/test/com/bigdata/bop/joinGraph/ branches/RDR/bigdata/src/test/com/bigdata/bop/util/ branches/RDR/bigdata/src/test/com/bigdata/jsr166/ branches/RDR/bigdata/src/test/com/bigdata/util/httpd/ branches/RDR/bigdata-compatibility/ branches/RDR/bigdata-jini/src/java/com/bigdata/attr/ branches/RDR/bigdata-jini/src/java/com/bigdata/disco/ branches/RDR/bigdata-jini/src/java/com/bigdata/util/config/ branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/ branches/RDR/bigdata-perf/ branches/RDR/bigdata-perf/btc/ branches/RDR/bigdata-perf/btc/src/resources/ branches/RDR/bigdata-perf/lubm/ branches/RDR/bigdata-perf/uniprot/ branches/RDR/bigdata-perf/uniprot/src/ branches/RDR/bigdata-rdf/src/java/com/bigdata/bop/rdf/aggregate/ branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/changesets/ branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/error/ branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/internal/ branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/relation/ branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/util/ branches/RDR/bigdata-rdf/src/samples/ branches/RDR/bigdata-rdf/src/test/com/bigdata/bop/rdf/aggregate/ branches/RDR/bigdata-rdf/src/test/com/bigdata/rdf/internal/ branches/RDR/bigdata-rdf/src/test/com/bigdata/rdf/relation/ branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/bench/ branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/changesets/ branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/bench/ branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/webapp/ branches/RDR/dsi-utils/ branches/RDR/dsi-utils/LEGAL/ branches/RDR/dsi-utils/lib/ branches/RDR/dsi-utils/src/ branches/RDR/dsi-utils/src/java/ branches/RDR/dsi-utils/src/java/it/ branches/RDR/dsi-utils/src/java/it/unimi/ branches/RDR/dsi-utils/src/test/ branches/RDR/dsi-utils/src/test/it/unimi/ branches/RDR/dsi-utils/src/test/it/unimi/dsi/ branches/RDR/lgpl-utils/src/java/it/unimi/dsi/fastutil/bytes/custom/ branches/RDR/lgpl-utils/src/test/it/unimi/dsi/fastutil/bytes/custom/ branches/RDR/osgi/ branches/RDR/src/resources/bin/config/ Index: branches/RDR/bigdata/lib/jetty =================================================================== --- branches/RDR/bigdata/lib/jetty 2014-04-21 19:15:16 UTC (rev 8132) +++ branches/RDR/bigdata/lib/jetty 2014-04-21 20:59:35 UTC (rev 8133) Property changes on: branches/RDR/bigdata/lib/jetty ___________________________________________________________________ Modified: svn:mergeinfo ## -1,6 +1,7 ## +/branches/BIGDATA_MGC_HA1_HA5/bigdata/lib/jetty:8025-8122 /branches/BIGDATA_OPENRDF_2_6_9_UPDATE/bigdata/lib/jetty:6769-6785 /branches/BIGDATA_RELEASE_1_2_0/bigdata/lib/jetty:6766-7380 -/branches/BIGDATA_RELEASE_1_3_0/bigdata/lib/jetty:7665-7913 +/branches/BIGDATA_RELEASE_1_3_0/bigdata/lib/jetty:7665-8131 /branches/INT64_BRANCH/bigdata/lib/jetty:4486-4522 /branches/MGC_1_3_0/bigdata/lib/jetty:7609-7752 /branches/QUADS_QUERY_BRANCH/bigdata/lib/jetty:4525-4531,4533-4548,4550-4584,4586-4609,4611-4632,4634-4643,4646-4672,4674-4685,4687-4693,4697-4735,4737-4782,4784-4792,4794-4796,4798-4801 \ No newline at end of property Index: branches/RDR/bigdata/src/java/com/bigdata/bop/aggregate =================================================================== --- branches/RDR/bigdata/src/java/com/bigdata/bop/aggregate 2014-04-21 19:15:16 UTC (rev 8132) +++ branches/RDR/bigdata/src/java/com/bigdata/bop/aggregate 2014-04-21 20:59:35 UTC (rev 8133) Property changes on: branches/RDR/bigdata/src/java/com/bigdata/bop/aggregate ___________________________________________________________________ Modified: svn:mergeinfo ## -1,6 +1,7 ## +/branches/BIGDATA_MGC_HA1_HA5/bigdata/src/java/com/bigdata/bop/aggregate:8025-8122 /branches/BIGDATA_OPENRDF_2_6_9_UPDATE/bigdata/src/java/com/bigdata/bop/aggregate:6769-6785 /branches/BIGDATA_RELEASE_1_2_0/bigdata/src/java/com/bigdata/bop/aggregate:6766-7380 -/branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/bop/aggregate:7665-7913 +/branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/bop/aggregate:7665-8131 /branches/INT64_BRANCH/bigdata/src/java/com/bigdata/bop/aggregate:4486-4522 /branches/MGC_1_3_0/bigdata/src/java/com/bigdata/bop/aggregate:7609-7752 /branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/aggregate:4525-4531,4533-4548,4550-4584,4586-4609,4611-4632,4634-4643,4646-4672,4674-4685,4687-4693,4697-4735,4737-4782,4784-4792,4794-4796,4798-4801 \ No newline at end of property Modified: branches/RDR/bigdata/src/java/com/bigdata/bop/engine/QueryEngine.java =================================================================== --- branches/RDR/bigdata/src/java/com/bigdata/bop/engine/QueryEngine.java 2014-04-21 19:15:16 UTC (rev 8132) +++ branches/RDR/bigdata/src/java/com/bigdata/bop/engine/QueryEngine.java 2014-04-21 20:59:35 UTC (rev 8133) @@ -610,7 +610,7 @@ * <p> * If the deadline has expired, {@link IRunningQuery#cancel(boolean)} will * be invoked. In order for a compute bound operator to terminate in a - * timely fashion, it MUST periodically test {@link Thread#isInterrupted()}. + * timely fashion, it MUST periodically test {@link Thread#interrupted()}. * <p> * Note: The deadline of a query may be set at most once. Thus, a query * which is entered into the {@link #deadlineQueue} may not have its Modified: branches/RDR/bigdata/src/java/com/bigdata/bop/join/PipelineJoin.java =================================================================== --- branches/RDR/bigdata/src/java/com/bigdata/bop/join/PipelineJoin.java 2014-04-21 19:15:16 UTC (rev 8132) +++ branches/RDR/bigdata/src/java/com/bigdata/bop/join/PipelineJoin.java 2014-04-21 20:59:35 UTC (rev 8133) @@ -1834,7 +1834,7 @@ if (bindex++ % 50 == 0) { // Periodically check for an interrupt. - if (Thread.currentThread().isInterrupted()) + if (Thread.interrupted()) throw new InterruptedException(); } Index: branches/RDR/bigdata/src/java/com/bigdata/bop/joinGraph =================================================================== --- branches/RDR/bigdata/src/java/com/bigdata/bop/joinGraph 2014-04-21 19:15:16 UTC (rev 8132) +++ branches/RDR/bigdata/src/java/com/bigdata/b... [truncated message content] |
From: <dme...@us...> - 2014-04-29 03:33:33
|
Revision: 8141 http://sourceforge.net/p/bigdata/code/8141 Author: dmekonnen Date: 2014-04-29 03:33:29 +0000 (Tue, 29 Apr 2014) Log Message: ----------- Adding brew formula. deploy-artifact-nss target added to build.xml to produce a minimal archive for running NSS. Modified Paths: -------------- branches/RDR/build.xml Added Paths: ----------- branches/RDR/bigdata/src/resources/deployment/brew/ branches/RDR/bigdata/src/resources/deployment/brew/bigdata.rb Added: branches/RDR/bigdata/src/resources/deployment/brew/bigdata.rb =================================================================== --- branches/RDR/bigdata/src/resources/deployment/brew/bigdata.rb (rev 0) +++ branches/RDR/bigdata/src/resources/deployment/brew/bigdata.rb 2014-04-29 03:33:29 UTC (rev 8141) @@ -0,0 +1,65 @@ +require 'formula' + +# Documentation: https://github.com/mxcl/homebrew/wiki/Formula-Cookbook +# /usr/local/Library/Contributions/example-formula.rb +# PLEASE REMOVE ALL GENERATED COMMENTS BEFORE SUBMITTING YOUR PULL REQUEST! + +class Bigdata < Formula + homepage 'http://bigdata.com/blog/' + url 'http://bigdata.com/deploy/bigdata-1.3.0.tgz' + sha1 'a395a243a2746ce47cf8893f2207fd2e0de4a9c1' + + def install + prefix.install Dir['*'] + end + + def caveats; <<-EOS.undent + After launching, visit the Bigdata Workbench at: + + http://localhost:8080/bigdata + + "bigdata" command synopis: + ------------------------- + + Start the server: + + % bigdata start + + Stop the server: + + % bigdata stop + + Restart the server: + + % bigdata restart + + To tune the server configuration, edit the "#{var}/jetty/WEB-INF/RWStore.properties" file. + + Further documentation: + + #{doc} + EOS + end + + plist_options :startup => 'true', :manual => 'bigdata start' + + def plist; <<-EOS.undent + <?xml version="1.0" encoding="UTF-8"?> + <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" + "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> + <plist version="1.0"> + <dict> + <key>Label</key> + <string>#{plist_name}</string> + <key>Program</key> + <string>#{bin}/bigdata</string> + <key>RunAtLoad</key> + <true/> + <key>WorkingDirectory</key> + <string>#{prefix}</string> + </dict> + </plist> + EOS + end + +end Modified: branches/RDR/build.xml =================================================================== --- branches/RDR/build.xml 2014-04-29 02:10:07 UTC (rev 8140) +++ branches/RDR/build.xml 2014-04-29 03:33:29 UTC (rev 8141) @@ -1209,12 +1209,16 @@ <!-- Stage documentation from the wiki. --> <get dest="${dist.doc}/HAJournalServer.html" - src="http://sourceforge.net/apps/mediawiki/bigdata/index.php?title=HAJournalServer&printable=yes" + src="http://wiki.bigdata.com/wiki/index.php/HAJournalServer" /> <get dest="${dist.doc}/NanoSparqlServer.html" - src="http://sourceforge.net/apps/mediawiki/bigdata/index.php?title=NanoSparqlServer&printable=yes" + src="http://wiki.bigdata.com/wiki/index.php/NanoSparqlServer" /> - + + <!-- Stage files specific to NSS deployments provided by Brew and Chef. --> + <copy file="${src.resources}/bin/bigdata" + todir="${dist.bin}" /> + <chmod file="${dist.bin}/bigdata" perm="755" /> </target> <!-- --> @@ -1280,6 +1284,7 @@ <exclude name="bigdata/bin/disco-tool" /> <exclude name="bigdata/bin/pstart" /> <exclude name="bigdata/bin/startHAServices" /> + <exclude name="bigdata/bin/bigdata" /> </tarfileset> <!-- Add scripts separately, making them executable --> @@ -1293,6 +1298,35 @@ </target> + <target name="deploy-artifact-nss" depends="clean, stage" + description="Create compressed tar file for Jetty based deployment via Brew and Chef installers."> + + <tar destfile="${bigdata.dir}/REL-NSS.${version}.tgz" + compression="gzip"> + + <tarfileset dir="${bigdata.dir}/dist"> + <include name="bigdata/doc/**" /> + <exclude name="bigdata/doc/HAJournalServer.html" /> + <include name="bigdata/lib/**" /> + <exclude name="bigdata/lib/bigdata-ganglia.jar" /> + <exclude name="bigdata/lib/browser.jar" /> + <exclude name="bigdata/lib/reggie.jar" /> + <exclude name="bigdata/lib/zookeeper.jar" /> + <exclude name="bigdata/lib/jsk-*.jar" /> + <exclude name="bigdata/lib-dl" /> + <exclude name="bigdata/lib-ext" /> + <include name="bigdata/var/jetty/**" /> + </tarfileset> + + <!-- Add scripts separately, making them executable --> + + <tarfileset dir="${bigdata.dir}/dist" filemode="755"> + <include name="bigdata/bin/bigdata" /> + </tarfileset> + </tar> + + </target> + <!-- FIXME DEBUG and add 'depends="javadoc, stage" (should stage stage javadoc?)' --> <!-- Note: can require 'rpm' and 'rpm-build. --> <!-- TODO: We do not need both this and "deploy-artifact". --> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dme...@us...> - 2014-04-30 03:31:54
|
Revision: 8146 http://sourceforge.net/p/bigdata/code/8146 Author: dmekonnen Date: 2014-04-30 03:31:43 +0000 (Wed, 30 Apr 2014) Log Message: ----------- Additions to build an NSS (only) package for Brew and Chef installers. Modified Paths: -------------- branches/RDR/build.xml Added Paths: ----------- branches/RDR/src/resources/deployment/ branches/RDR/src/resources/deployment/nss/ branches/RDR/src/resources/deployment/nss/WEB-INF/ branches/RDR/src/resources/deployment/nss/WEB-INF/RWStore.properties branches/RDR/src/resources/deployment/nss/WEB-INF/classes/ branches/RDR/src/resources/deployment/nss/WEB-INF/classes/log4j.properties branches/RDR/src/resources/deployment/nss/bin/ branches/RDR/src/resources/deployment/nss/bin/bigdata branches/RDR/src/resources/deployment/nss/bin/startNSS branches/RDR/src/resources/deployment/nss/etc/ branches/RDR/src/resources/deployment/nss/etc/jetty.xml Modified: branches/RDR/build.xml =================================================================== --- branches/RDR/build.xml 2014-04-29 23:37:02 UTC (rev 8145) +++ branches/RDR/build.xml 2014-04-30 03:31:43 UTC (rev 8146) @@ -1215,12 +1215,21 @@ src="http://wiki.bigdata.com/wiki/index.php/NanoSparqlServer?printable=yes" /> - <!-- Note: Commented out. This is breaking the RDR build. --> - <!-- Stage files specific to NSS deployments provided by Brew and Chef. - <copy file="${src.resources}/bin/bigdata" + <!-- Stage files specific to NSS deployments provided by Brew and Chef. --> + <chmod file="${dist.bin}/bigdata" perm="755" /> + <copy file="${src.resources}/deployment/nss/bin/bigdata" todir="${dist.bin}" /> <chmod file="${dist.bin}/bigdata" perm="755" /> ---> + <copy file="${src.resources}/deployment/nss/bin/startNSS" + todir="${dist.bin}" /> + <chmod file="${dist.bin}/startNSS" perm="755" /> + <copy file="${src.resources}/deployment/nss/etc/jetty.xml" + todir="${dist.var.jetty}/etc" /> + <copy file="${src.resources}/deployment/nss/WEB-INF/RWStore.properties" + todir="${dist.var.jetty}/WEB-INF" /> + <copy file="${src.resources}/deployment/nss/WEB-INF/classes/log4j.properties" + todir="${dist.var.jetty}/WEB-INF/classes" /> + </target> <!-- --> @@ -1318,12 +1327,17 @@ <exclude name="bigdata/lib-dl" /> <exclude name="bigdata/lib-ext" /> <include name="bigdata/var/jetty/**" /> + <include name="bigdata/var/config/logging/logging.properties" /> + <exclude name="bigdata/var/jetty/jetty.xml" /> + <exclude name="bigdata/var/jetty/html/new.html" /> + <exclude name="bigdata/var/jetty/html/old.html" /> </tarfileset> <!-- Add scripts separately, making them executable --> <tarfileset dir="${bigdata.dir}/dist" filemode="755"> <include name="bigdata/bin/bigdata" /> + <include name="bigdata/bin/startNSS" /> </tarfileset> </tar> Added: branches/RDR/src/resources/deployment/nss/WEB-INF/RWStore.properties =================================================================== --- branches/RDR/src/resources/deployment/nss/WEB-INF/RWStore.properties (rev 0) +++ branches/RDR/src/resources/deployment/nss/WEB-INF/RWStore.properties 2014-04-30 03:31:43 UTC (rev 8146) @@ -0,0 +1,40 @@ +# +# Note: These options are applied when the journal and the triple store are +# first created. + +## +## Journal options. +## + +# The backing file. This contains all your data. You want to put this someplace +# safe. The default locator will wind up in the directory from which you start +# your servlet container. +com.bigdata.journal.AbstractJournal.file=<%= BD_HOME %>/var/data/bigdata.jnl + +# The persistence engine. Use 'Disk' for the WORM or 'DiskRW' for the RWStore. +com.bigdata.journal.AbstractJournal.bufferMode=DiskRW + +# Setup for the RWStore recycler rather than session protection. +com.bigdata.service.AbstractTransactionService.minReleaseAge=1 + +com.bigdata.btree.writeRetentionQueue.capacity=4000 +com.bigdata.btree.BTree.branchingFactor=128 + +# 200M initial extent. +com.bigdata.journal.AbstractJournal.initialExtent=209715200 +com.bigdata.journal.AbstractJournal.maximumExtent=209715200 + +## +## Setup for QUADS mode without the full text index. +## +com.bigdata.rdf.sail.truthMaintenance=false +com.bigdata.rdf.store.AbstractTripleStore.quads=true +com.bigdata.rdf.store.AbstractTripleStore.statementIdentifiers=false +com.bigdata.rdf.store.AbstractTripleStore.textIndex=false +com.bigdata.rdf.store.AbstractTripleStore.axiomsClass=com.bigdata.rdf.axioms.NoAxioms + +# Bump up the branching factor for the lexicon indices on the default kb. +com.bigdata.namespace.kb.lex.com.bigdata.btree.BTree.branchingFactor=400 + +# Bump up the branching factor for the statement indices on the default kb. +com.bigdata.namespace.kb.spo.com.bigdata.btree.BTree.branchingFactor=1024 Added: branches/RDR/src/resources/deployment/nss/WEB-INF/classes/log4j.properties =================================================================== --- branches/RDR/src/resources/deployment/nss/WEB-INF/classes/log4j.properties (rev 0) +++ branches/RDR/src/resources/deployment/nss/WEB-INF/classes/log4j.properties 2014-04-30 03:31:43 UTC (rev 8146) @@ -0,0 +1,97 @@ +# Default log4j configuration. See the individual classes for the +# specific loggers, but generally they are named for the class in +# which they are defined. + +# Default log4j configuration for testing purposes. +# +# You probably want to set the default log level to ERROR. +# +log4j.rootCategory=WARN, file +#log4j.rootCategory=WARN, dest2 + +# Loggers. +# Note: logging here at INFO or DEBUG will significantly impact throughput! +log4j.logger.com.bigdata=WARN +log4j.logger.com.bigdata.btree=WARN +log4j.logger.com.bigdata.counters.History=ERROR +log4j.logger.com.bigdata.counters.XMLUtility$MyHandler=ERROR +log4j.logger.com.bigdata.counters.query.CounterSetQuery=INFO +log4j.logger.com.bigdata.journal.CompactTask=INFO +log4j.logger.com.bigdata.relation.accesspath.BlockingBuffer=ERROR +log4j.logger.com.bigdata.rdf.load=INFO +log4j.logger.com.bigdata.rdf.store.DataLoader=INFO +log4j.logger.com.bigdata.resources.AsynchronousOverflowTask=INFO + +# file +log4j.appender.file=org.apache.log4j.RollingFileAppender +log4j.appender.file.File=<%= BD_HOME %>/var/log/bigdata.log +log4j.appender.file.MaxFileSize=4MB +log4j.appender.file.MaxBackupIndex=10 +log4j.appender.file.layout=org.apache.log4j.PatternLayout +log4j.appender.file.layout.ConversionPattern=%d{MMM dd, yyyy HH:mm:ss} %-5p: %F:%L: %m%n + + +# Normal data loader (single threaded). +#log4j.logger.com.bigdata.rdf.store.DataLoader=INFO + +# dest1 +log4j.appender.dest1=org.apache.log4j.ConsoleAppender +log4j.appender.dest1.layout=org.apache.log4j.PatternLayout +log4j.appender.dest1.layout.ConversionPattern=%-5p: %F:%L: %m%n +#log4j.appender.dest1.layout.ConversionPattern=%-5p: %r %l: %m%n +#log4j.appender.dest1.layout.ConversionPattern=%-5p: %m%n +#log4j.appender.dest1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n +#log4j.appender.dest1.layout.ConversionPattern=%-4r(%d) [%t] %-5p %c(%l:%M) %x - %m%n + +# dest2 includes the thread name and elapsed milliseconds. +# Note: %r is elapsed milliseconds. +# Note: %t is the thread name. +# See http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/PatternLayout.html +log4j.appender.dest2=org.apache.log4j.ConsoleAppender +log4j.appender.dest2.layout=org.apache.log4j.PatternLayout +log4j.appender.dest2.layout.ConversionPattern=%-5p: %r %X{hostname} %X{serviceUUID} %X{taskname} %X{timestamp} %X{resources} %t %l: %m%n + +## +# Rule execution log. This is a formatted log file (comma delimited). +log4j.logger.com.bigdata.relation.rule.eval.RuleLog=INFO,ruleLog +log4j.additivity.com.bigdata.relation.rule.eval.RuleLog=false +log4j.appender.ruleLog=org.apache.log4j.FileAppender +log4j.appender.ruleLog.Threshold=ALL +log4j.appender.ruleLog.File=<%= BD_HOME %>/var/log/rules.log +log4j.appender.ruleLog.Append=true +# I find that it is nicer to have this unbuffered since you can see what +# is going on and to make sure that I have complete rule evaluation logs +# on shutdown. +log4j.appender.ruleLog.BufferedIO=false +log4j.appender.ruleLog.layout=org.apache.log4j.PatternLayout +log4j.appender.ruleLog.layout.ConversionPattern=%m + +## +# Summary query evaluation log (tab delimited file). Uncomment the next line to enable. +#log4j.logger.com.bigdata.bop.engine.QueryLog=INFO,queryLog +log4j.additivity.com.bigdata.bop.engine.QueryLog=false +log4j.appender.queryLog=org.apache.log4j.FileAppender +log4j.appender.queryLog.Threshold=ALL +log4j.appender.queryLog.File=<%= BD_HOME %>var/log/queryLog.csv +log4j.appender.queryLog.Append=true +# I find that it is nicer to have this unbuffered since you can see what +# is going on and to make sure that I have complete rule evaluation logs +# on shutdown. +log4j.appender.queryLog.BufferedIO=false +log4j.appender.queryLog.layout=org.apache.log4j.PatternLayout +log4j.appender.queryLog.layout.ConversionPattern=%m + +## +# BOp run state trace (tab delimited file). Uncomment the next line to enable. +#log4j.logger.com.bigdata.bop.engine.RunState$TableLog=INFO,queryRunStateLog +log4j.additivity.com.bigdata.bop.engine.RunState$TableLog=false +log4j.appender.queryRunStateLog=org.apache.log4j.FileAppender +log4j.appender.queryRunStateLog.Threshold=ALL +log4j.appender.queryRunStateLog.File=<%= BD_HOME %>/var/log/queryRunState.log +log4j.appender.queryRunStateLog.Append=true +# I find that it is nicer to have this unbuffered since you can see what +# is going on and to make sure that I have complete rule evaluation logs +# on shutdown. +log4j.appender.queryRunStateLog.BufferedIO=false +log4j.appender.queryRunStateLog.layout=org.apache.log4j.PatternLayout +log4j.appender.queryRunStateLog.layout.ConversionPattern=%m Added: branches/RDR/src/resources/deployment/nss/bin/bigdata =================================================================== --- branches/RDR/src/resources/deployment/nss/bin/bigdata (rev 0) +++ branches/RDR/src/resources/deployment/nss/bin/bigdata 2014-04-30 03:31:43 UTC (rev 8146) @@ -0,0 +1,105 @@ +#!/bin/bash + +# init.d style script for bigdata HA services. The script can be used +# to 'start' or 'stop' services. +# +# Environment: +# +# binDir - The directory containing the installed scripts. +# pidFile - The pid is written on this file. +# +# Misc. +# +# See http://tldp.org/LDP/abs/html/index.html +# +# Note: Blank lines are significant in shell scripts. +# +# Note: Children must do "exit 0" to indicate success. +# +# Note: Convert DOS cr-lf to unix style in emacs: C-x RET f then unix + +# Source function library (just used for 'action'). If you don't have this +# it SHOULD automatically use the inline definition for "action()". + +# +# the following template line will be replaced by a deployer application (e.g. brew, chef) +# +export BD_HOME="<%= BD_HOME %>" +pidFile=${BD_HOME}/var/lock/pid +binDir=${BD_HOME}/bin + + +# +# See how we were called. +# +case "$1" in + start) +# +# Start the ServiceStarter and child services if not running. +# + if [ -f "$pidFile" ]; then + read pid < "$pidFile" + pidno=$( ps ax | grep $pid | awk '{ print $1 }' | grep $pid ) + if [ -z "$pidno" ]; then +# The process has died so remove the old pid file. + echo $"`date` : `hostname` : $pid died?" + rm -f "$pidFile" + fi + fi + if [ ! -f "$pidFile" ]; then + echo $"`date` : `hostname` : bringing up services: " + $binDir/startNSS + else + echo $"`date` : `hostname` : running as $pid" + fi + ;; + stop) +# +# Stop the ServiceStarter and all child services. +# + if [ -f "$pidFile" ]; then + read pid < "$pidFile" + pidno=$( ps ax | grep $pid | awk '{ print $1 }' | grep $pid ) + if [ -z "$pidno" ]; then +# The process has died so remove the old pid file. + echo $"`date` : `hostname` : $pid died?" + rm -f "$pidFile" + else + echo $"`date` : `hostname` : bringing down services: " + kill $pid + rm -f "$pidFile" + fi + fi + ;; + status) +# +# Report status for the ServicesManager (up or down). +# + if [ -f "$pidFile" ]; then + read pid < "$pidFile" + pidno=$( ps ax | grep $pid | awk '{ print $1 }' | grep $pid ) + if [ -z "$pidno" ]; then + echo $"`date` : `hostname` : process died? pid=$pid." + else + echo $"`date` : `hostname` : running as $pid." + fi + else + echo $"`date` : `hostname` : not running." + fi + ;; +# +# Simply stop then start. +# + restart) + $0 stop + $0 start + ;; + *) +# +# Usage +# + echo $"Usage: $0 {start|stop|status|restart}" + exit 1 +esac + +exit 0 Property changes on: branches/RDR/src/resources/deployment/nss/bin/bigdata ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: branches/RDR/src/resources/deployment/nss/bin/startNSS =================================================================== --- branches/RDR/src/resources/deployment/nss/bin/startNSS (rev 0) +++ branches/RDR/src/resources/deployment/nss/bin/startNSS 2014-04-30 03:31:43 UTC (rev 8146) @@ -0,0 +1,66 @@ +#!/bin/bash + +export INSTALL_DIR=${BD_HOME} +export LIB_DIR=${INSTALL_DIR}/lib +export JETTY_CLASSPATH=`find ${LIB_DIR} -name '*.jar' -print0 | tr '\0' ':'` +export JETTY_DIR=${INSTALL_DIR}/var/jetty +export CONFIG_DIR=${INSTALL_DIR}/var/config + +export LOGGING_CONFIG=${CONFIG_DIR}/logging/logging.properties +export LOG4J_CONFIG=${JETTY_DIR}/WEB-INF/classes/log4j.properties +export LOG_DIR=${BD_HOME}/var/log +mkdir -p $LOG_DIR +export DATA_DIR=${BD_HOME}/var/data +mkdir -p $DATA_DIR + +export NSS="com.bigdata.rdf.sail.webapp.NanoSparqlServer" +export NSS_NAMESPACE="kb" +export NSS_PROPERTIES=${JETTY_DIR}/WEB-INF/RWStore.properties + +export JVM_OPTS="-Djava.awt.headless=true -server -Xmx4G -XX:MaxDirectMemorySize=3000m -XX:+UseG1GC" + +if [ -z "${JETTY_PORT}" ]; then + export JETTY_PORT="8080" +fi +if [ -z "${JETTY_XML}" ]; then + export JETTY_XML="${JETTY_DIR}/jetty.xml" +fi +if [ -z "${JETTY_RESOURCE_BASE}" ]; then + export JETTY_RESOURCE_BASE="${JETTY_DIR}/var/jetty" +fi + + +export JETTY_OPTS="\ + -Djetty.port=${JETTY_PORT}\ + -Djetty.resourceBase=${JETTY_RESOURCE_BASE}\ + -DJETTY_XML=${JETTY_XML}\ + -Djava.util.logging.config.file=${LOGGING_CONFIG}\ + -Dlog4j.configuration=${LOG4J_CONFIG}\ +" + +export JAVA_OPTS="\ + ${JVM_OPTS}\ + ${JETTY_OPTS}\ +" + +# Setup the directory for the pid of the ServiceStarter process. +lockDir=${INSTALL_DIR}/var/lock +mkdir -p $lockDir +pidFile=$lockDir/pid + +cmd="java ${JAVA_OPTS} \ + -cp ${JETTY_CLASSPATH} \ + $NSS \ + -jettyXml ${JETTY_XML} \ + $JETTY_PORT \ + $NSS_NAMESPACE \ + $NSS_PROPERTIES\ +" + +echo "Running: $cmd" +$cmd > /dev/null 2>&1 & +# $cmd& +pid=$! +echo "PID=$pid" +echo "$pid">$pidFile +exit Property changes on: branches/RDR/src/resources/deployment/nss/bin/startNSS ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: branches/RDR/src/resources/deployment/nss/etc/jetty.xml =================================================================== --- branches/RDR/src/resources/deployment/nss/etc/jetty.xml (rev 0) +++ branches/RDR/src/resources/deployment/nss/etc/jetty.xml 2014-04-30 03:31:43 UTC (rev 8146) @@ -0,0 +1,133 @@ +<?xml version="1.0"?> +<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd"> +<!-- See http://www.eclipse.org/jetty/documentation/current/ --> +<!-- See http://wiki.eclipse.org/Jetty/Reference/jetty.xml_syntax --> +<Configure id="Server" class="org.eclipse.jetty.server.Server"> + + <!-- =========================================================== --> + <!-- Configure the Server Thread Pool. --> + <!-- The server holds a common thread pool which is used by --> + <!-- default as the executor used by all connectors and servlet --> + <!-- dispatches. --> + <!-- --> + <!-- Configuring a fixed thread pool is vital to controlling the --> + <!-- maximal memory footprint of the server and is a key tuning --> + <!-- parameter for tuning. In an application that rarely blocks --> + <!-- then maximal threads may be close to the number of 5*CPUs. --> + <!-- In an application that frequently blocks, then maximal --> + <!-- threads should be set as high as possible given the memory --> + <!-- available. --> + <!-- --> + <!-- Consult the javadoc of o.e.j.util.thread.QueuedThreadPool --> + <!-- for all configuration that may be set here. --> + <!-- =========================================================== --> + <!-- uncomment to change type of threadpool --> + <Arg name="threadpool"><New id="threadpool" class="org.eclipse.jetty.util.thread.QueuedThreadPool"/></Arg> + <!-- --> + <Get name="ThreadPool"> + <Set name="minThreads" type="int"><SystemProperty name="jetty.threads.min" default="10"/></Set> + <Set name="maxThreads" type="int"><SystemProperty name="jetty.threads.max" default="64"/></Set> + <Set name="idleTimeout" type="int"><SystemProperty name="jetty.threads.timeout" default="60000"/></Set> + <Set name="detailedDump">false</Set> + </Get> + + <!-- =========================================================== --> + <!-- Http Configuration. --> + <!-- This is a common configuration instance used by all --> + <!-- connectors that can carry HTTP semantics (HTTP, HTTPS, SPDY)--> + <!-- It configures the non wire protocol aspects of the HTTP --> + <!-- semantic. --> + <!-- --> + <!-- Consult the javadoc of o.e.j.server.HttpConfiguration --> + <!-- for all configuration that may be set here. --> + <!-- =========================================================== --> + <New id="httpConfig" class="org.eclipse.jetty.server.HttpConfiguration"> + <Set name="secureScheme">https</Set> + <Set name="securePort"><Property name="jetty.secure.port" default="8443" /></Set> + <Set name="outputBufferSize"><Property name="jetty.output.buffer.size" default="32768" /></Set> + <Set name="requestHeaderSize"><Property name="jetty.request.header.size" default="8192" /></Set> + <Set name="responseHeaderSize"><Property name="jetty.response.header.size" default="8192" /></Set> + <Set name="sendServerVersion"><Property name="jetty.send.server.version" default="true" /></Set> + <Set name="sendDateHeader"><Property name="jetty.send.date.header" default="false" /></Set> + <Set name="headerCacheSize">512</Set> + <!-- Uncomment to enable handling of X-Forwarded- style headers + <Call name="addCustomizer"> + <Arg><New class="org.eclipse.jetty.server.ForwardedRequestCustomizer"/></Arg> + </Call> + --> + </New> + + <!-- Configure the HTTP endpoint. --> + <Call name="addConnector"> + <Arg> + <New class="org.eclipse.jetty.server.ServerConnector"> + <Arg name="server"><Ref refid="Server" /></Arg> + <Arg name="factories"> + <Array type="org.eclipse.jetty.server.ConnectionFactory"> + <Item> + <New class="org.eclipse.jetty.server.HttpConnectionFactory"> + <Arg name="config"><Ref refid="httpConfig" /></Arg> + </New> + </Item> + </Array> + </Arg> + <Set name="host"><Property name="jetty.host" /></Set> + <Set name="port"><Property name="jetty.port" default="8080" /></Set> + <Set name="idleTimeout"><Property name="http.timeout" default="30000"/></Set> + </New> + </Arg> + </Call> + + <!-- =========================================================== --> + <!-- Set handler Collection Structure --> + <!-- =========================================================== --> + <Set name="handler"> + <New id="Handlers" class="org.eclipse.jetty.server.handler.HandlerCollection"> + <Set name="handlers"> + <Array type="org.eclipse.jetty.server.Handler"> + <Item> + <!-- This is the bigdata web application. --> + <New id="WebAppContext" class="org.eclipse.jetty.webapp.WebAppContext"> + <Set name="resourceBase"> + <!-- The location of the top-level of the bigdata webapp. --> + <Property name="jetty.resourceBase" default="<%= JETTY_DIR %>" /> + </Set> + <Set name="contextPath">/bigdata</Set> + <Set name="descriptor"><%= JETTY_DIR %>/WEB-INF/web.xml</Set> + <Set name="parentLoaderPriority">true</Set> + <Set name="extractWAR">false</Set> + </New> + </Item> + <Item> + <!-- This appears to be necessary in addition to the above. --> + <!-- Without this, it will not resolve http://localhost:8080/ --> + <!-- and can fail to deliver some of the static content. --> + <New id="ResourceHandler" class="org.eclipse.jetty.server.handler.ResourceHandler"> + <Set name="resourceBase"> + <!-- The location of the top-level of the bigdata webapp. --> + <Property name="jetty.resourceBase" default="<%= JETTY_DIR %>" /> + </Set> + <Set name="welcomeFiles"> + <Array type="java.lang.String"> + <Item>html/index.html</Item> + </Array> + </Set> + </New> + </Item> + <!-- <Item> + <New id="DefaultHandler" class="org.eclipse.jetty.server.handler.DefaultHandler"></New> + </Item> --> + </Array> + </Set> + </New> + </Set> + + <!-- =========================================================== --> + <!-- extra server options --> + <!-- =========================================================== --> + <Set name="stopAtShutdown">true</Set> + <Set name="stopTimeout">5000</Set> + <Set name="dumpAfterStart"><Property name="jetty.dump.start" default="false"/></Set> + <Set name="dumpBeforeStop"><Property name="jetty.dump.stop" default="false"/></Set> + +</Configure> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dme...@us...> - 2014-04-30 15:45:09
|
Revision: 8150 http://sourceforge.net/p/bigdata/code/8150 Author: dmekonnen Date: 2014-04-30 15:45:05 +0000 (Wed, 30 Apr 2014) Log Message: ----------- Updates for to pass the brew audit. Modified Paths: -------------- branches/RDR/bigdata/src/resources/deployment/brew/bigdata.rb branches/RDR/src/resources/deployment/nss/bin/bigdata branches/RDR/src/resources/deployment/nss/bin/startNSS Modified: branches/RDR/bigdata/src/resources/deployment/brew/bigdata.rb =================================================================== --- branches/RDR/bigdata/src/resources/deployment/brew/bigdata.rb 2014-04-30 11:22:55 UTC (rev 8149) +++ branches/RDR/bigdata/src/resources/deployment/brew/bigdata.rb 2014-04-30 15:45:05 UTC (rev 8150) @@ -3,27 +3,31 @@ class Bigdata < Formula homepage 'http://bigdata.com/blog/' url 'http://bigdata.com/deploy/bigdata-1.3.0.tgz' - sha1 '466cbce9241e3d418a53a88d81b108f42f4e9f4a' + sha1 '5bfec0cfe47139dc0ab3ead7f61d5fc156b57bb9' def install prefix.install Dir['*'] + # make brew happy and rename the "lib" directory: + system "mv #{lib} #{libexec}" + # Set the installation path as the root for the bin scripts: - system "sed -i .bk 's|<%= BD_HOME %>|#{prefix}|' #{bin}/bigdata" + system "sed -i .bak 's|<%= BD_HOME %>|#{prefix}|' #{bin}/bigdata" + system "sed -i .bak 's|<%= INSTALL_TYPE %>|BREW|' #{bin}/bigdata ; rm #{bin}/bigdata.bak" - + # Set the Jetty root as the resourceBase in the jetty.xml file: - system "sed -i .bk 's|<%= JETTY_DIR %>|#{prefix}/var/jetty|' #{prefix}/var/jetty/etc/jetty.xml" + system "sed -i .bak 's|<%= JETTY_DIR %>|#{prefix}/var/jetty|' #{prefix}/var/jetty/etc/jetty.xml ; rm #{prefix}/var/jetty/etc/jetty.xml.bak" # Set the installation path as the root for bigdata.jnl file location (<bigdata_home>/data): - system "sed -i .bk 's|<%= BD_HOME %>|#{prefix}|' #{prefix}/var/jetty/WEB-INF/RWStore.properties" + system "sed -i .bak 's|<%= BD_HOME %>|#{prefix}|' #{prefix}/var/jetty/WEB-INF/RWStore.properties ; rm #{prefix}/var/jetty/WEB-INF/RWStore.properties.bak" # Set the installation path as the root for log files (<bigdata_home>/log): - system "sed -i .bk 's|<%= BD_HOME %>|#{prefix}|' #{prefix}/var/jetty/WEB-INF/classes/log4j.properties" + system "sed -i .bak 's|<%= BD_HOME %>|#{prefix}|' #{prefix}/var/jetty/WEB-INF/classes/log4j.properties; rm #{prefix}/var/jetty/WEB-INF/classes/log4j.properties.bak " end def caveats; <<-EOS.undent - After launching, visit the Bigdata Workbench at: + After launching, visit the Bigdata Workbench at: http://localhost:8080/bigdata @@ -45,7 +49,7 @@ To tune the server configuration, edit the "#{prefix}/var/jetty/WEB-INF/RWStore.properties" file. Further documentation: - + #{prefix}/doc EOS end Modified: branches/RDR/src/resources/deployment/nss/bin/bigdata =================================================================== --- branches/RDR/src/resources/deployment/nss/bin/bigdata 2014-04-30 11:22:55 UTC (rev 8149) +++ branches/RDR/src/resources/deployment/nss/bin/bigdata 2014-04-30 15:45:05 UTC (rev 8150) @@ -24,7 +24,8 @@ # # the following template line will be replaced by a deployer application (e.g. brew, chef) # -export BD_HOME="<%= BD_HOME %>" +export INSTALL_TYPE="BREW" +export BD_HOME="/usr/local/Cellar/bigdata/1.3.0" pidFile=${BD_HOME}/var/lock/pid binDir=${BD_HOME}/bin @@ -47,8 +48,9 @@ fi fi if [ ! -f "$pidFile" ]; then - echo $"`date` : `hostname` : bringing up services: " + echo -ne $"`date` : `hostname` : bringing bigdata services up ... " $binDir/startNSS + echo "done!" else echo $"`date` : `hostname` : running as $pid" fi @@ -65,9 +67,10 @@ echo $"`date` : `hostname` : $pid died?" rm -f "$pidFile" else - echo $"`date` : `hostname` : bringing down services: " + echo -ne $"`date` : `hostname` : bringing bigdata service down ... " kill $pid rm -f "$pidFile" + echo "done!" fi fi ;; Modified: branches/RDR/src/resources/deployment/nss/bin/startNSS =================================================================== --- branches/RDR/src/resources/deployment/nss/bin/startNSS 2014-04-30 11:22:55 UTC (rev 8149) +++ branches/RDR/src/resources/deployment/nss/bin/startNSS 2014-04-30 15:45:05 UTC (rev 8150) @@ -1,7 +1,11 @@ #!/bin/bash export INSTALL_DIR=${BD_HOME} -export LIB_DIR=${INSTALL_DIR}/lib +if [ $INSTALL_TYPE == "BREW" ]; then + export LIB_DIR=${INSTALL_DIR}/libexec +else + export LIB_DIR=${INSTALL_DIR}/lib +fi export JETTY_CLASSPATH=`find ${LIB_DIR} -name '*.jar' -print0 | tr '\0' ':'` export JETTY_DIR=${INSTALL_DIR}/var/jetty export CONFIG_DIR=${INSTALL_DIR}/var/config @@ -66,10 +70,8 @@ $NSS_PROPERTIES\ " -echo "Running: $cmd" +# echo "Running: $cmd" $cmd > /dev/null 2>&1 & -# $cmd& pid=$! -echo "PID=$pid" +# echo "PID=$pid" echo "$pid">$pidFile -exit This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dme...@us...> - 2014-04-30 17:53:02
|
Revision: 8151 http://sourceforge.net/p/bigdata/code/8151 Author: dmekonnen Date: 2014-04-30 17:52:58 +0000 (Wed, 30 Apr 2014) Log Message: ----------- additional refinements following feedkback. Modified Paths: -------------- branches/RDR/bigdata/src/resources/deployment/brew/bigdata.rb branches/RDR/src/resources/deployment/nss/bin/bigdata Modified: branches/RDR/bigdata/src/resources/deployment/brew/bigdata.rb =================================================================== --- branches/RDR/bigdata/src/resources/deployment/brew/bigdata.rb 2014-04-30 15:45:05 UTC (rev 8150) +++ branches/RDR/bigdata/src/resources/deployment/brew/bigdata.rb 2014-04-30 17:52:58 UTC (rev 8151) @@ -1,59 +1,30 @@ -require 'formula' +require "formula" class Bigdata < Formula - homepage 'http://bigdata.com/blog/' - url 'http://bigdata.com/deploy/bigdata-1.3.0.tgz' - sha1 '5bfec0cfe47139dc0ab3ead7f61d5fc156b57bb9' + homepage "http://bigdata.com/blog/" + url "http://bigdata.com/deploy/bigdata-1.3.0.tgz" + sha1 "c22fa05df965019b3132161507ce0e77a4a1f6e2" def install - prefix.install Dir['*'] + prefix.install "doc" + prefix.install "var" + prefix.install "bin" + libexec.install "lib" - # make brew happy and rename the "lib" directory: - system "mv #{lib} #{libexec}" - # Set the installation path as the root for the bin scripts: - system "sed -i .bak 's|<%= BD_HOME %>|#{prefix}|' #{bin}/bigdata" - system "sed -i .bak 's|<%= INSTALL_TYPE %>|BREW|' #{bin}/bigdata ; rm #{bin}/bigdata.bak" + inreplace "#{bin}/bigdata", "<%= BD_HOME %>", prefix + inreplace "#{bin}/bigdata", "<%= INSTALL_TYPE %>", "BREW" - # Set the Jetty root as the resourceBase in the jetty.xml file: - system "sed -i .bak 's|<%= JETTY_DIR %>|#{prefix}/var/jetty|' #{prefix}/var/jetty/etc/jetty.xml ; rm #{prefix}/var/jetty/etc/jetty.xml.bak" + inreplace "#{prefix}/var/jetty/etc/jetty.xml", "<%= JETTY_DIR %>", "#{prefix}/var/jetty" # Set the installation path as the root for bigdata.jnl file location (<bigdata_home>/data): - system "sed -i .bak 's|<%= BD_HOME %>|#{prefix}|' #{prefix}/var/jetty/WEB-INF/RWStore.properties ; rm #{prefix}/var/jetty/WEB-INF/RWStore.properties.bak" + inreplace "#{prefix}/var/jetty/WEB-INF/RWStore.properties", "<%= BD_HOME %>", prefix # Set the installation path as the root for log files (<bigdata_home>/log): - system "sed -i .bak 's|<%= BD_HOME %>|#{prefix}|' #{prefix}/var/jetty/WEB-INF/classes/log4j.properties; rm #{prefix}/var/jetty/WEB-INF/classes/log4j.properties.bak " + inreplace "#{prefix}/var/jetty/WEB-INF/classes/log4j.properties", "<%= BD_HOME %>", prefix end - def caveats; <<-EOS.undent - After launching, visit the Bigdata Workbench at: - - http://localhost:8080/bigdata - - "bigdata" command synopis: - ------------------------- - - Start the server: - - % bigdata start - - Stop the server: - - % bigdata stop - - Restart the server: - - % bigdata restart - - To tune the server configuration, edit the "#{prefix}/var/jetty/WEB-INF/RWStore.properties" file. - - Further documentation: - - #{prefix}/doc - EOS - end - plist_options :startup => 'true', :manual => 'bigdata start' def plist; <<-EOS.undent Modified: branches/RDR/src/resources/deployment/nss/bin/bigdata =================================================================== --- branches/RDR/src/resources/deployment/nss/bin/bigdata 2014-04-30 15:45:05 UTC (rev 8150) +++ branches/RDR/src/resources/deployment/nss/bin/bigdata 2014-04-30 17:52:58 UTC (rev 8151) @@ -24,8 +24,8 @@ # # the following template line will be replaced by a deployer application (e.g. brew, chef) # -export INSTALL_TYPE="BREW" -export BD_HOME="/usr/local/Cellar/bigdata/1.3.0" +export INSTALL_TYPE="<%= INSTALL_TYPE %>" +export BD_HOME="<%= BD_HOME %>" pidFile=${BD_HOME}/var/lock/pid binDir=${BD_HOME}/bin @@ -101,6 +101,7 @@ # # Usage # + me=`basename $0` echo $"Usage: $0 {start|stop|status|restart}" exit 1 esac This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tho...@us...> - 2014-04-30 18:49:25
|
Revision: 8157 http://sourceforge.net/p/bigdata/code/8157 Author: thompsonbry Date: 2014-04-30 18:49:20 +0000 (Wed, 30 Apr 2014) Log Message: ----------- Refactor of the HA load balancer. At this point the NOP, round-robin, and ganglia-based policies work against their test suites. The client must indicate whether a request will be proxied to the quorum leader (/bigdata/LBS/leader/...) or whether it will be load balanced across the joined services (/bigdata/LBS/read/...). @see #624 (HA LBS). Modified Paths: -------------- branches/RDR/bigdata-jini/src/java/com/bigdata/journal/jini/ha/AbstractServer.java branches/RDR/bigdata-jini/src/java/com/bigdata/journal/jini/ha/HAJournal-A.config branches/RDR/bigdata-jini/src/java/com/bigdata/journal/jini/ha/HAJournal-B.config branches/RDR/bigdata-jini/src/java/com/bigdata/journal/jini/ha/HAJournal-C.config branches/RDR/bigdata-jini/src/java/com/bigdata/journal/jini/ha/HAJournalServer.java branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/AbstractHA3JournalServerTestCase.java branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/AbstractHAJournalServerTestCase.java branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/HAJournal-A.config branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/HAJournal-B.config branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/HAJournal-C.config branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/HAJournalTest.java branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestAll.java branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHANamespace.java branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/BigdataServlet.java branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/HALoadBalancerServlet.java branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/IHALoadBalancerPolicy.java branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/QueryServlet.java branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/client/ConnectOptions.java branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/client/RemoteRepository.java branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/client/RemoteRepositoryManager.java branches/RDR/bigdata-war/src/WEB-INF/web.xml Added Paths: ----------- branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/AbstractHA3LoadBalancerTestCase.java branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestAll_LBS.java branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA3LoadBalancer_GangliaLBS.java branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA3LoadBalancer_NOP.java branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA3LoadBalancer_RoundRobin.java branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/lbs/ branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/lbs/AbstractLBSPolicy.java branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/lbs/HostScore.java branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/lbs/ServiceScore.java branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/lbs/policy/ branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/lbs/policy/NOPLBSPolicy.java branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/lbs/policy/RoundRobinLBSPolicy.java branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/lbs/policy/ganglia/ branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/lbs/policy/ganglia/DefaultHostScoringRule.java branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/lbs/policy/ganglia/GangliaLBSPolicy.java branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/lbs/policy/ganglia/HostTable.java branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/lbs/policy/ganglia/IHostScoringRule.java branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/lbs/policy/ganglia/LoadOneHostScoringRule.java branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/lbs/policy/ganglia/NOPHostScoringRule.java Modified: branches/RDR/bigdata-jini/src/java/com/bigdata/journal/jini/ha/AbstractServer.java =================================================================== --- branches/RDR/bigdata-jini/src/java/com/bigdata/journal/jini/ha/AbstractServer.java 2014-04-30 18:39:03 UTC (rev 8156) +++ branches/RDR/bigdata-jini/src/java/com/bigdata/journal/jini/ha/AbstractServer.java 2014-04-30 18:49:20 UTC (rev 8157) @@ -202,7 +202,7 @@ * * @see ConfigurationOptions */ - private ServiceID serviceID; + private final AtomicReference<ServiceID> serviceIDRef = new AtomicReference<ServiceID>(); /** * The directory for the service. This is the directory within which the @@ -377,7 +377,7 @@ */ public ServiceID getServiceID() { - return serviceID; + return serviceIDRef.get(); } @@ -674,15 +674,12 @@ if (serviceIdFile.exists()) { + final ServiceID tmp; try { - // Read from file, set on class. - this.serviceID = readServiceId(serviceIdFile); + // Read from file. + tmp = readServiceId(serviceIdFile); - if (log.isInfoEnabled()) - log.info("Existing service instance: serviceID=" - + serviceID); - } catch (IOException ex) { fatal("Could not read serviceID from existing file: " @@ -691,6 +688,12 @@ } + if (log.isInfoEnabled()) + log.info("Existing service instance: serviceID=" + tmp); + + // Set the ServiceID that we read from the file. + setServiceID(tmp); + } else { if (log.isInfoEnabled()) @@ -725,9 +728,10 @@ * want to use that ServiceID and not whatever was in the * Configuration. */ - UUID serviceUUID = this.serviceID == null ? null : JiniUtil - .serviceID2UUID(this.serviceID); - + final ServiceID serviceID = getServiceID(); + UUID serviceUUID = serviceID == null ? null : JiniUtil + .serviceID2UUID(serviceID); + for (Entry e : entries) { if (e instanceof Name && serviceName == null) { @@ -796,13 +800,16 @@ // if serviceUUID assigned then set ServiceID from it now. if (serviceUUID != null) { - if (this.serviceID != null) { + // Convert ServiceID read from Configuration. + final ServiceID tmp = JiniUtil.uuid2ServiceID(serviceUUID); - // Convert ServiceID read from Configuration. - final ServiceID tmp = JiniUtil - .uuid2ServiceID(serviceUUID); + // Already assigned ServiceID (may be null). + final ServiceID existingServiceID = getServiceID(); + + if (existingServiceID != null) { - if (!this.serviceID.equals(tmp)) { + // Already set. + if (!existingServiceID.equals(tmp)) { /* * This is a paranoia check on the Configuration and @@ -816,19 +823,21 @@ + serviceIdFile + " : Configuration=" + tmp + ", but expected =" - + this.serviceID); + + existingServiceID); } + } else { + + // Set serviceID. + setServiceID(JiniUtil.uuid2ServiceID(serviceUUID)); + } - // Set serviceID. - this.serviceID = JiniUtil.uuid2ServiceID(serviceUUID); - if (!serviceIdFile.exists()) { // write the file iff it does not exist. - writeServiceIDOnFile(this.serviceID); + writeServiceIDOnFile(tmp); } else { /* @@ -836,16 +845,16 @@ * assigned ServiceID. */ try { - final ServiceID tmp = readServiceId(serviceIdFile); - if (!this.serviceID.equals(tmp)) { + final ServiceID tmp2 = readServiceId(serviceIdFile); + if (!tmp.equals(tmp2)) { /* * The assigned ServiceID and ServiceID written * on the file do not agree. */ throw new RuntimeException( - "Entry has ServiceID=" + this.serviceID + "Entry has ServiceID=" + tmp + ", but file as ServiceID=" - + tmp); + + tmp2); } } catch (IOException e1) { throw new RuntimeException(e1); @@ -860,11 +869,15 @@ * ourselves. */ - // set serviceID. - this.serviceID = JiniUtil.uuid2ServiceID(UUID.randomUUID()); + // Generate a random ServiceID. + final ServiceID tmp = JiniUtil.uuid2ServiceID(UUID + .randomUUID()); - // write the file iff it does not exist. - writeServiceIDOnFile(this.serviceID); + // Set our ServiceID. + setServiceID(tmp); + + // Write the file iff it does not exist. + writeServiceIDOnFile(tmp); } @@ -908,7 +921,7 @@ public String toString() { // note: MAY be null. - final ServiceID serviceID = this.serviceID; + final ServiceID serviceID = this.serviceIDRef.get(); return getClass().getName() + "{serviceName=" @@ -1153,7 +1166,9 @@ // The as-configured Entry[] attributes. final Entry[] attributes = entries.toArray(new Entry[0]); - if (this.serviceID != null) { + final ServiceID serviceID = getServiceID(); + + if (serviceID != null) { /* * We read the serviceID from local storage (either the @@ -1188,28 +1203,30 @@ throw new AssertionError();// keeps compiler happy. } - /* - * Note: This is synchronized in case set via listener by the - * JoinManager, which would be rather fast action on its part. - */ - synchronized (this) { +// /* +// * Note: This is synchronized in case set via listener by the +// * JoinManager, which would be rather fast action on its part. +// */ +// synchronized (this) { +// +// final ServiceID serviceID = getServiceID(); +// +// if (serviceID != null) { +// +// /* +// * Notify the service that it's service UUID has been set. +// * +// * @todo Several things currently depend on this notification. +// * In effect, it is being used as a proxy for the service +// * registration event. +// */ +// +// notifyServiceUUID(serviceID); +// +// } +// +// } - if (this.serviceID != null) { - - /* - * Notify the service that it's service UUID has been set. - * - * @todo Several things currently depend on this notification. - * In effect, it is being used as a proxy for the service - * registration event. - */ - - notifyServiceUUID(serviceID); - - } - - } - } /** @@ -1313,6 +1330,25 @@ } + private void setServiceID(final ServiceID newValue) { + + if (newValue == null) + throw new IllegalArgumentException(); + + if (!serviceIDRef.compareAndSet(null/* expect */, newValue)) { + + throw new IllegalStateException( + "ServiceID may not be changed: ServiceID=" + + serviceIDRef.get() + ", proposed=" + newValue); + + } + + if (log.isInfoEnabled()) + log.info("serviceID=" + newValue + ", serviceUUID=" + + JiniUtil.serviceID2UUID(newValue)); + + } + /** * This method is responsible for saving the {@link ServiceID} on stable * storage when it is invoked. It will be invoked iff the {@link ServiceID} @@ -1324,28 +1360,13 @@ @Override synchronized public void serviceIDNotify(final ServiceID serviceID) { - if (serviceID == null) - throw new IllegalArgumentException(); - - if (log.isInfoEnabled()) - log.info("serviceID=" + serviceID + ", serviceUUID=" - + JiniUtil.serviceID2UUID(serviceID)); + setServiceID(serviceID); - if (this.serviceID != null && !this.serviceID.equals(serviceID)) { - - throw new IllegalStateException( - "ServiceID may not be changed: ServiceID=" + this.serviceID - + ", proposed=" + serviceID); - - } - - this.serviceID = serviceID; - assert serviceIdFile != null : "serviceIdFile not defined?"; writeServiceIDOnFile(serviceID); - notifyServiceUUID(serviceID); +// notifyServiceUUID(serviceID); /* * Update the Entry[] for the service registrars to reflect the assigned @@ -1410,35 +1431,14 @@ } - /** - * Notify the {@link AbstractService} that it's service UUID has been set. - */ - synchronized protected void notifyServiceUUID(final ServiceID serviceID) { - - if (serviceID == null) - throw new IllegalArgumentException(); - - if (this.serviceID != null && !this.serviceID.equals(serviceID)) { - - throw new IllegalStateException( - "ServiceID may not be changed: ServiceID=" + this.serviceID - + ", proposed=" + serviceID); - - } - -// if(impl != null && impl instanceof AbstractService) { +// /** +// * Notify the {@link AbstractService} that it's service UUID has been set. +// */ +// final protected void notifyServiceUUID(final ServiceID newValue) { // -// final UUID serviceUUID = JiniUtil.serviceID2UUID(serviceID); -// -// final AbstractService service = ((AbstractService) impl); -// -// service.setServiceUUID(serviceUUID); -// -// } - - this.serviceID = serviceID; - - } +// setServiceID(newValue); +// +// } /** * Logs a message. If the service is no longer registered with any Modified: branches/RDR/bigdata-jini/src/java/com/bigdata/journal/jini/ha/HAJournal-A.config =================================================================== --- branches/RDR/bigdata-jini/src/java/com/bigdata/journal/jini/ha/HAJournal-A.config 2014-04-30 18:39:03 UTC (rev 8156) +++ branches/RDR/bigdata-jini/src/java/com/bigdata/journal/jini/ha/HAJournal-A.config 2014-04-30 18:49:20 UTC (rev 8157) @@ -272,8 +272,7 @@ new NV(com.bigdata.journal.PlatformStatsPlugIn.Options.COLLECT_PLATFORM_STATISTICS,"true"), new NV(com.bigdata.journal.GangliaPlugIn.Options.GANGLIA_LISTEN,"true"), - new NV(com.bigdata.journal.GangliaPlugIn.Options.GANGLIA_REPORT,"true"), - new NV(com.bigdata.journal.GangliaPlugIn.Options.REPORT_DELAY,"2000"), // NB: short delay is used to develop the HALBS. +// new NV(com.bigdata.journal.GangliaPlugIn.Options.GANGLIA_REPORT,"true"), }, bigdata.kb); Modified: branches/RDR/bigdata-jini/src/java/com/bigdata/journal/jini/ha/HAJournal-B.config =================================================================== --- branches/RDR/bigdata-jini/src/java/com/bigdata/journal/jini/ha/HAJournal-B.config 2014-04-30 18:39:03 UTC (rev 8156) +++ branches/RDR/bigdata-jini/src/java/com/bigdata/journal/jini/ha/HAJournal-B.config 2014-04-30 18:49:20 UTC (rev 8157) @@ -274,8 +274,7 @@ new NV(com.bigdata.journal.PlatformStatsPlugIn.Options.COLLECT_PLATFORM_STATISTICS,"true"), new NV(com.bigdata.journal.GangliaPlugIn.Options.GANGLIA_LISTEN,"true"), - new NV(com.bigdata.journal.GangliaPlugIn.Options.GANGLIA_REPORT,"true"), - new NV(com.bigdata.journal.GangliaPlugIn.Options.REPORT_DELAY,"2000"), // NB: short delay is used to develop the HALBS. +// new NV(com.bigdata.journal.GangliaPlugIn.Options.GANGLIA_REPORT,"true"), }, bigdata.kb); Modified: branches/RDR/bigdata-jini/src/java/com/bigdata/journal/jini/ha/HAJournal-C.config =================================================================== --- branches/RDR/bigdata-jini/src/java/com/bigdata/journal/jini/ha/HAJournal-C.config 2014-04-30 18:39:03 UTC (rev 8156) +++ branches/RDR/bigdata-jini/src/java/com/bigdata/journal/jini/ha/HAJournal-C.config 2014-04-30 18:49:20 UTC (rev 8157) @@ -269,9 +269,9 @@ new NV(AbstractTransactionService.Options.MIN_RELEASE_AGE,"1"), + new NV(com.bigdata.journal.PlatformStatsPlugIn.Options.COLLECT_PLATFORM_STATISTICS,"true"), new NV(com.bigdata.journal.GangliaPlugIn.Options.GANGLIA_LISTEN,"true"), - new NV(com.bigdata.journal.GangliaPlugIn.Options.GANGLIA_REPORT,"true"), - new NV(com.bigdata.journal.GangliaPlugIn.Options.REPORT_DELAY,"2000"), // NB: short delay is used to develop the HALBS. +// new NV(com.bigdata.journal.GangliaPlugIn.Options.GANGLIA_REPORT,"true"), }, bigdata.kb); Modified: branches/RDR/bigdata-jini/src/java/com/bigdata/journal/jini/ha/HAJournalServer.java =================================================================== --- branches/RDR/bigdata-jini/src/java/com/bigdata/journal/jini/ha/HAJournalServer.java 2014-04-30 18:39:03 UTC (rev 8156) +++ branches/RDR/bigdata-jini/src/java/com/bigdata/journal/jini/ha/HAJournalServer.java 2014-04-30 18:49:20 UTC (rev 8157) @@ -103,6 +103,8 @@ import com.bigdata.quorum.zk.ZKQuorumImpl; import com.bigdata.rdf.sail.CreateKBTask; import com.bigdata.rdf.sail.webapp.ConfigParams; +import com.bigdata.rdf.sail.webapp.HALoadBalancerServlet; +import com.bigdata.rdf.sail.webapp.IHALoadBalancerPolicy; import com.bigdata.rdf.sail.webapp.NanoSparqlServer; import com.bigdata.rwstore.RWStore; import com.bigdata.service.AbstractHATransactionService; @@ -4665,6 +4667,47 @@ } /** + * Change the {@link IHALoadBalancerPolicy}. + * <p> + * TODO There are some intrinsic problems with this method that should be + * resolved before exposing it as an administrative API on the + * {@link HAGlue} interface. + * <p> + * (1) This only applies to running instances of the + * {@link HALoadBalancerServlet}. If an instance is started after this + * method is called, it will run with the as-configured + * {@link IHALoadBalancerPolicy} instance of the one specified in the last + * invocation of this method. + * <p> + * (2) There are various race conditions that exist with respect to: (a) the + * atomic change over of the {@link IHALoadBalancerPolicy} during an + * in-flight request; and (b) the atomic destroy of the old policy once + * there are no more in-flight requests using that old policy. + * + * TODO Either the {@link IHALoadBalancerPolicy} needs to be serializable or + * we need to pass along the class name and the configuration parameters. + * For this case, the configuration should be set from the caller specified + * values rather than those potentially associated with <code>web.xml</code> + * , especially since <code>web.xml</code> might not even have the necessary + * configuration parameters defined for the caller specified policy. + */ + public void setHALoadBalancerPolicy(final IHALoadBalancerPolicy policy) { + + final Server server = this.jettyServer; + + if (server == null) + throw new IllegalStateException(); + + final WebAppContext wac = NanoSparqlServer.getWebApp(server); + + if (log.isInfoEnabled()) + log.info("Will set LBS: wac=" + wac + ", policy: " + policy); + + HALoadBalancerServlet.setPolicy(wac.getServletContext(), policy); + + } + + /** * Conditionally create the default KB instance as identified in * <code>web.xml</code>. * Modified: branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/AbstractHA3JournalServerTestCase.java =================================================================== --- branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/AbstractHA3JournalServerTestCase.java 2014-04-30 18:39:03 UTC (rev 8156) +++ branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/AbstractHA3JournalServerTestCase.java 2014-04-30 18:49:20 UTC (rev 8157) @@ -96,6 +96,7 @@ import com.bigdata.quorum.zk.ZKQuorumClient; import com.bigdata.quorum.zk.ZKQuorumImpl; import com.bigdata.rdf.sail.webapp.client.HttpException; +import com.bigdata.rdf.sail.webapp.client.RemoteRepository; import com.bigdata.service.jini.JiniClientConfig; import com.bigdata.service.jini.RemoteDestroyAdmin; import com.bigdata.util.InnerCause; @@ -1403,7 +1404,7 @@ return 3; } - + /** * Return Zookeeper quorum that can be used to reflect (or act on) the * distributed quorum state for the logical service. @@ -2791,6 +2792,26 @@ */ protected void simpleTransaction_noQuorumCheck(final HAGlue leader) throws IOException, Exception { + + simpleTransaction_noQuorumCheck(leader, false/* useLoadBalancer */); + + } + + /** + * Immediately issues a simple transaction against the service. + * + * @param haGlue + * The service (must be the leader to succeed unless using the + * load balancer). + * @param useLoadBalancer + * When <code>true</code> the LBS will be used and the update + * request may be directed to any service and will be proxied to + * the leader if necessary. + * @throws IOException + * @throws Exception + */ + protected void simpleTransaction_noQuorumCheck(final HAGlue haGlue, + final boolean useLoadBalancer) throws IOException, Exception { final StringBuilder sb = new StringBuilder(); sb.append("DROP ALL;\n"); @@ -2802,9 +2823,12 @@ final String updateStr = sb.toString(); - getRemoteRepository(leader).prepareUpdate(updateStr).evaluate(); - - } + final RemoteRepository repo = getRemoteRepository(haGlue, + useLoadBalancer); + + repo.prepareUpdate(updateStr).evaluate(); + + } /** * Verify that an attempt to read on the specified service is disallowed. Added: branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/AbstractHA3LoadBalancerTestCase.java =================================================================== --- branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/AbstractHA3LoadBalancerTestCase.java (rev 0) +++ branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/AbstractHA3LoadBalancerTestCase.java 2014-04-30 18:49:20 UTC (rev 8157) @@ -0,0 +1,510 @@ +/** + +Copyright (C) SYSTAP, LLC 2006-2010. All rights reserved. + +Contact: + SYSTAP, LLC + 4501 Tower Road + Greensboro, NC 27410 + lic...@bi... + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; version 2 of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +package com.bigdata.journal.jini.ha; + +import java.io.IOException; +import java.io.Serializable; + +import javax.servlet.ServletConfig; +import javax.servlet.ServletContext; + +import net.jini.config.Configuration; + +import com.bigdata.ha.HAGlue; +import com.bigdata.ha.HAStatusEnum; +import com.bigdata.journal.IIndexManager; +import com.bigdata.journal.jini.ha.HAJournalServer.HAQuorumService; +import com.bigdata.journal.jini.ha.HAJournalTest.HAGlueTest; +import com.bigdata.rdf.sail.webapp.HALoadBalancerServlet; +import com.bigdata.rdf.sail.webapp.IHALoadBalancerPolicy; +import com.bigdata.rdf.sail.webapp.client.RemoteRepository; +import com.bigdata.rdf.sail.webapp.client.RemoteRepository.RemoveOp; + +/** + * Test suite for the HA load balancer. + * + * @author <a href="mailto:tho...@us...">Bryan Thompson</a> + * + * @see <a href="http://trac.bigdata.com/ticket/624"> HA Load Balancer </a> + * + * FIXME Test query using GET and POST to ensure that we have coverage in + * the load balancer servlet for proper forwarding (to the local service) + * and proper proxying (to a remote service) for both GET and POST. Also + * test PUT and DELETE methods. Tests need to be written to the leader (for + * forward to the local machine) and the follower (for proxying to the + * leader). + * <p> + * Test coverage should also extend to a service that is running but not + * joined with the met quorum. E.g., in an error state. Right now that will + * not work because the error state terminates the zk client connection and + * the HA load balancer is reusing the same zk client as the embedded + * HAJournalServer. + * + * FIXME Make sure that each concrete implementation of this class sets the + * specific load balancer policy to be tested *and* verifies that the + * specific load balancer policy is in effect. + * + * FIXME Write tests of handling when a service is up but not joined with + * the met quorum and when a service is not running. There are going to be + * some cases where the {@link HALoadBalancerServlet} proxies a request + * where the target service goes asynchronously and is unable to respond. + * What kinds of exceptions does this generate and how can we handle those + * exceptions? + * + * FIXME Write tests of handling when the target service of the original + * request goes into an error state concurrent with the request. The + * {@link HALoadBalancerServlet} should be robust even when the + * {@link HAQuorumService} associated with the {@link HAJournalServer} is + * not running. We do not want to be unable to proxy to another service + * just because this one is going through an error state. Would it make + * more sense to have a 2nd Quorum object for this purpose - one that is + * not started and stopped by the HAJournalServer? + * + * FIXME Verify that the bigdata remote service call works when the client + * is a bigdata HA replication cluster. This should work just fine if the + * sparqlEndpointURL is <code>.../bigdata/LBS/sparql</code>. + * + * FIXME Verify correct load balancing when addressing a non-default + * namespace (.../bigdata/LBS/namespace/NAMESPACE/sparql). + */ +abstract public class AbstractHA3LoadBalancerTestCase extends + AbstractHA3JournalServerTestCase { + + /** + * {@inheritDoc} + * <p> + * Note: This overrides some {@link Configuration} values for the + * {@link HAJournalServer} in order to establish conditions suitable for + * testing the {@link ISnapshotPolicy} and {@link IRestorePolicy}. + */ + @Override + protected String[] getOverrides() { + + return new String[]{ +// "com.bigdata.journal.HAJournal.properties=" +TestHA3JournalServer.getTestHAJournalProperties(com.bigdata.journal.HAJournal.properties), + "com.bigdata.journal.jini.ha.HAJournalServer.restorePolicy=new com.bigdata.journal.jini.ha.DefaultRestorePolicy(0L,1,0)", + "com.bigdata.journal.jini.ha.HAJournalServer.snapshotPolicy=new com.bigdata.journal.jini.ha.NoSnapshotPolicy()", +// "com.bigdata.journal.jini.ha.HAJournalServer.HAJournalClass=\""+HAJournalTest.class.getName()+"\"", +// "com.bigdata.journal.jini.ha.HAJournalServer.onlineDisasterRecovery=true", +// /* +// * Setup configuration that supports the LBS. Note: This does not work. We would need to override (replace) HAJournal.properties to do this. +// */ +// "com.bigdata.journal.PlatformStatsPlugIn.Options.COLLECT_PLATFORM_STATISTICS=true", +// "com.bigdata.journal.GangliaPlugIn.Options.GANGLIA_LISTEN=true", +// "com.bigdata.journal.GangliaPlugIn.Options.GANGLIA_REPORT=true", +// "com.bigdata.journal.GangliaPlugIn.Options.REPORT_DELAY=2000", // NB: short delay is used to develop the HALBS. +// "com.bigdata.rdf.sail.webapp.HALoadBalancerServlet.policy=com.bigdata.rdf.sail.webapp.HALoadBalancerServlet.NOPLBSPolicy" + }; + + } + + public AbstractHA3LoadBalancerTestCase() { + } + + public AbstractHA3LoadBalancerTestCase(final String name) { + + super(name); + + } + + protected void setPolicy(final IHALoadBalancerPolicy policy, + final HAGlue... services) throws IOException { + + for(HAGlue service : services) { + + ((HAGlueTest) service).setHALoadBalancerPolicy(policy); + + } + + } + + /** + * Return a {@link Serializable} instance of the + * {@link IHALoadBalancerPolicy} to be tested. + * <p> + * Note: The {@link ServletContext} on the target server will govern + * the initialization of the policy. + * + * @see IHALoadBalancerPolicy#init(ServletConfig, IIndexManager) + */ + abstract protected IHALoadBalancerPolicy newTestPolicy(); + + /** + * Simple tests with the load balancer enabled. This test verifies that we + * can issue both read and write requests to the load balancer. Since read + * requests are silently forwarded to the local service if the load balancer + * is disabled, this is really only giving us good information about whether + * or not the update requests have been proxied. + */ + public void test_HA3LoadBalancer_01() throws Exception { + + final ABC abc = new ABC(true/* sequential */); + + final HAGlue serverA = abc.serverA, serverB = abc.serverB, serverC = abc.serverC; + + final HAGlue[] services = new HAGlue[] { serverA, serverB, serverC }; + + // Verify quorum is FULLY met. + awaitFullyMetQuorum(); + + // await the KB create commit point to become visible on each service. + awaitCommitCounter(1L, services); + + // Verify binary equality of ALL journals. + assertDigestsEquals(services); + + // Impose the desired LBS policy. + setPolicy(newTestPolicy(), services); + + // Repositories without the LBS. + final RemoteRepository[] repos = new RemoteRepository[3]; + repos[0] = getRemoteRepository(serverA); + repos[1] = getRemoteRepository(serverB); + repos[2] = getRemoteRepository(serverC); + + /* + * Verify that query on all nodes is allowed. + */ + for (RemoteRepository r : repos) { + + // Should be empty. + assertEquals(0L, + countResults(r.prepareTupleQuery("SELECT * {?a ?b ?c}") + .evaluate())); + + } + + final RemoteRepository[] reposLBS = new RemoteRepository[3]; + reposLBS[0] = getRemoteRepository(serverA, true/* useLBS */); + reposLBS[1] = getRemoteRepository(serverB, true/* useLBS */); + reposLBS[2] = getRemoteRepository(serverC, true/* useLBS */); + + /* + * Verify that query on all nodes is allowed using the LBS. + */ + for (RemoteRepository r : reposLBS) { + + // Should be empty. + assertEquals(0L, + countResults(r.prepareTupleQuery("SELECT * {?a ?b ?c}") + .evaluate())); + + } + + /* + * Send an update request to the LBS on each service. The request should + * be proxied to the leader if it is directed to a follower. This is how + * we know whether the LBS is active or not. If it is not active, then + * the follower will refuse to process the update. + */ + + simpleTransaction_noQuorumCheck(serverA, true/* useLBS */); // leader. + simpleTransaction_noQuorumCheck(serverB, true/* useLBS */); // follower. + simpleTransaction_noQuorumCheck(serverC, true/* useLBS */); // follower. + + // await the KB create commit point to become visible on each service. + awaitCommitCounter(4L, new HAGlue[] { serverA, serverB, serverC }); + + // Verify binary equality of ALL journals. + assertDigestsEquals(new HAGlue[] { serverA, serverB, serverC }); + + } + + /** + * Test of DELETE on the leader. + */ + public void test_delete_leader() throws Exception { + + final ABC abc = new ABC(true/* sequential */); + + final HAGlue serverA = abc.serverA, serverB = abc.serverB, serverC = abc.serverC; + + // The expected HStatus for each of the services (A,B,C). + final HAStatusEnum[] expectedHAStatusArray = new HAStatusEnum[] { // + HAStatusEnum.Leader, // + HAStatusEnum.Follower,// + HAStatusEnum.Follower // + }; + + // The services in their join order. + final HAGlue[] services = new HAGlue[] { serverA, serverB, serverC }; + + // Verify quorum is FULLY met. + awaitFullyMetQuorum(); + + // await the KB create commit point to become visible on each service. + awaitCommitCounter(1L, services); + + // Verify binary equality of ALL journals. + assertDigestsEquals(services); + + // Verify the HAStatus of each service. + awaitHAStatus(expectedHAStatusArray, services); + + // Impose the desired LBS policy. + setPolicy(newTestPolicy(), services); + + // Repositories without the LBS. + final RemoteRepository[] repos = new RemoteRepository[3]; + repos[0] = getRemoteRepository(serverA); + repos[1] = getRemoteRepository(serverB); + repos[2] = getRemoteRepository(serverC); + + // Repositories with the LBS. + final RemoteRepository[] reposLBS = new RemoteRepository[3]; + reposLBS[0] = getRemoteRepository(serverA, true/* useLBS */); + reposLBS[1] = getRemoteRepository(serverB, true/* useLBS */); + reposLBS[2] = getRemoteRepository(serverC, true/* useLBS */); + + // Add some data using leader. + simpleTransaction_noQuorumCheck(serverA, false/* useLBS */); // leader. + + // Should be non-zero. + assertNotSame(0L, getCountStar(serverA, false/* useLBS */)); + + // delete everything using leader. + reposLBS[0].remove(new RemoveOp(null, null, null)); + + // Verify everything is gone on the leader. + awaitHAStatus(serverA, HAStatusEnum.Leader); + + // Should be zero. + assertEquals(0L, getCountStar(serverA, false/* useLBS */)); + + // await the commit point to become visible on each service. + awaitCommitCounter(3L, services); + + // Verify binary equality of ALL journals. + assertDigestsEquals(services); + + } + + /** + * Test of DELETE on the follower. + */ + public void test_delete_follower() throws Exception { + + final ABC abc = new ABC(true/* sequential */); + + final HAGlue serverA = abc.serverA, serverB = abc.serverB, serverC = abc.serverC; + + // The expected HStatus for each of the services (A,B,C). + final HAStatusEnum[] expectedHAStatusArray = new HAStatusEnum[] { // + HAStatusEnum.Leader, // + HAStatusEnum.Follower,// + HAStatusEnum.Follower // + }; + + // The services in their join order. + final HAGlue[] services = new HAGlue[] { serverA, serverB, serverC }; + + // Verify quorum is FULLY met. + awaitFullyMetQuorum(); + + // await the KB create commit point to become visible on each service. + awaitCommitCounter(1L, services); + + // Verify binary equality of ALL journals. + assertDigestsEquals(services); + + // Verify the HAStatus of each service. + awaitHAStatus(expectedHAStatusArray, services); + + // Impose the desired LBS policy. + setPolicy(newTestPolicy(), services); + + // Repositories without the LBS. + final RemoteRepository[] repos = new RemoteRepository[3]; + repos[0] = getRemoteRepository(serverA); + repos[1] = getRemoteRepository(serverB); + repos[2] = getRemoteRepository(serverC); + + // Repositories with the LBS. + final RemoteRepository[] reposLBS = new RemoteRepository[3]; + reposLBS[0] = getRemoteRepository(serverA, true/* useLBS */); + reposLBS[1] = getRemoteRepository(serverB, true/* useLBS */); + reposLBS[2] = getRemoteRepository(serverC, true/* useLBS */); + + // Add some data using leader. + simpleTransaction_noQuorumCheck(serverA, false/* useLBS */); // leader. + + // Should be non-zero. + assertNotSame(0L, getCountStar(serverA, false/* useLBS */)); + + // delete everything using 1st follower + reposLBS[1].remove(new RemoveOp(null, null, null)); + + // Verify everything is gone on the leader. + awaitHAStatus(serverA, HAStatusEnum.Leader); + + // Should be zero. + assertEquals(0L, getCountStar(serverA, false/* useLBS */)); + + // await the commit point to become visible on each service. + awaitCommitCounter(3L, services); + + // Verify binary equality of ALL journals. + assertDigestsEquals(services); + + } + + /** + * Test of a simple sequence of events that I often test through a web + * browser. This verifies that we can read on A and B using + * + * <pre> + * SELECT COUNT (*) + * </pre> + * + * and that we can write on A and B using + * + * <pre> + * PREFIX dc: <http://purl.org/dc/elements/1.1/> + * INSERT DATA + * { + * <http://example/book1> dc:title "A new book" ; + * dc:creator "A.N.Other" . + * } + * </pre> + * + * and + * + * <pre> + * PREFIX dc: <http://purl.org/dc/elements/1.1/> + * DELETE DATA + * { + * <http://example/book1> dc:title "A new book" ; + * dc:creator "A.N.Other" . + * } + * </pre> + */ + public void test_simple_sequence() throws Exception { + + final ABC abc = new ABC(true/* sequential */); + + final HAGlue serverA = abc.serverA, serverB = abc.serverB, serverC = abc.serverC; + + // The expected HStatus for each of the services (A,B,C). + final HAStatusEnum[] expectedHAStatusArray = new HAStatusEnum[] { // + HAStatusEnum.Leader, // + HAStatusEnum.Follower,// + HAStatusEnum.Follower // + }; + + // The services in their join order. + final HAGlue[] services = new HAGlue[] { serverA, serverB, serverC }; + + // Verify quorum is FULLY met. + awaitFullyMetQuorum(); + + // await the KB create commit point to become visible on each service. + awaitCommitCounter(1L, services); + + // Verify binary equality of ALL journals. + assertDigestsEquals(services); + + // Verify the HAStatus of each service. + awaitHAStatus(expectedHAStatusArray, services); + + // Impose the desired LBS policy. + setPolicy(newTestPolicy(), services); + + // Repositories without the LBS. + final RemoteRepository[] repos = new RemoteRepository[3]; + repos[0] = getRemoteRepository(serverA); + repos[1] = getRemoteRepository(serverB); + repos[2] = getRemoteRepository(serverC); + + // Repositories with the LBS. + final RemoteRepository[] reposLBS = new RemoteRepository[3]; + reposLBS[0] = getRemoteRepository(serverA, true/* useLBS */); + reposLBS[1] = getRemoteRepository(serverB, true/* useLBS */); + reposLBS[2] = getRemoteRepository(serverC, true/* useLBS */); + + /* + * Verify read on each service. + */ + assertEquals(0L, getCountStar(serverA)); + assertEquals(0L, getCountStar(serverB)); + assertEquals(0L, getCountStar(serverC)); + + /* + * Verify insert on A, read back on all. + */ + simpleInsertTransaction_noQuorumCheck(serverA, true/* useLoadBalancer */); + + assertEquals(2L, getCountStar(serverA)); + assertEquals(2L, getCountStar(serverB)); + assertEquals(2L, getCountStar(serverC)); + + /* + * Verify delete on B, read back on all. + */ + simpleDeleteTransaction_noQuorumCheck(serverB, true/* useLoadBalancer */); + + assertEquals(0L, getCountStar(serverA)); + assertEquals(0L, getCountStar(serverB)); + assertEquals(0L, getCountStar(serverC)); + + } + + protected void simpleInsertTransaction_noQuorumCheck(final HAGlue haGlue, + final boolean useLoadBalancer) throws IOException, Exception { + + final StringBuilder sb = new StringBuilder(); + sb.append("PREFIX dc: <http://purl.org/dc/elements/1.1/>\n"); + sb.append("INSERT DATA {\n"); + sb.append(" <http://example/book1> dc:title \"A new book\" ;\n"); + sb.append(" dc:creator \"A.N.Other\" .\n"); + sb.append("}\n"); + + final String updateStr = sb.toString(); + + final RemoteRepository repo = getRemoteRepository(haGlue, + useLoadBalancer); + + repo.prepareUpdate(updateStr).evaluate(); + + } + + protected void simpleDeleteTransaction_noQuorumCheck(final HAGlue haGlue, + final boolean useLoadBalancer) throws IOException, Exception { + + final StringBuilder sb = new StringBuilder(); + sb.append("PREFIX dc: <http://purl.org/dc/elements/1.1/>\n"); + sb.append("DELETE DATA {\n"); + sb.append(" <http://example/book1> dc:title \"A new book\" ;\n"); + sb.append(" dc:creator \"A.N.Other\" .\n"); + sb.append("}\n"); + + final String updateStr = sb.toString(); + + final RemoteRepository repo = getRemoteRepository(haGlue, + useLoadBalancer); + + repo.prepareUpdate(updateStr).evaluate(); + + } + +} Modified: branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/AbstractHAJournalServerTestCase.java =================================================================== --- branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/AbstractHAJournalServerTestCase.java 2014-04-30 18:39:03 UTC (rev 8156) +++ branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/AbstractHAJournalServerTestCase.java 2014-04-30 18:49:20 UTC (rev 8157) @@ -550,29 +550,51 @@ protected RemoteRepository getRemoteRepository(final HAGlue haGlue) throws IOException { + return getRemoteRepository(haGlue, false/* useLoadBalancer */); + + } + + /** + * Return a {@link RemoteRepository} for talking to the + * {@link NanoSparqlServer} instance associated with an {@link HAGlue} + * interface. + * + * @param haGlue + * The service. + * @param useLoadBalancer + * when <code>true</code> the URL will be the load balancer on + * that service and the request MAY be redirected to another + * service. + * + * @throws IOException + */ + protected RemoteRepository getRemoteRepository(final HAGlue haGlue, + final boolean useLoadBalancer) throws IOException { + final String sparqlEndpointURL = getNanoSparqlServerURL(haGlue) +// + (useLoadBalancer ? "/LBS" : "") + "/sparql"; - + // Client for talking to the NSS. final HttpClient httpClient = new DefaultHttpClient(ccm); final RemoteRepository repo = new RemoteRepository(sparqlEndpointURL, - httpClient, executorService); + useLoadBalancer, httpClient, executorService); return repo; } - protected RemoteRepositoryManager getRemoteRepositoryManager(final HAGlue haGlue) - throws IOException { + protected RemoteRepositoryManager getRemoteRepositoryManager( + final HAGlue haGlue, final boolean useLBS) throws IOException { final String endpointURL = getNanoSparqlServerURL(haGlue); // Client for talking to the NSS. final HttpClient httpClient = new DefaultHttpClient(ccm); - final RemoteRepositoryManager repo = new RemoteRepositoryManager(endpointURL, - httpClient, executorService); + final RemoteRepositoryManager repo = new RemoteRepositoryManager( + endpointURL, useLBS, httpClient, executorService); return repo; @@ -592,17 +614,22 @@ protected long countResults(final TupleQueryResult result) throws Exception { long count = 0; + try { - while (result.hasNext()) { + while (result.hasNext()) { - result.next(); + result.next(); - count++; + count++; + } + + } finally { + + result.close(); + } - result.close(); - return count; } @@ -613,26 +640,47 @@ * * @param haGlue * The service. + * * @return The value reported by COUNT(*). + * * @throws Exception * @throws IOException */ protected long getCountStar(final HAGlue haGlue) throws IOException, Exception { - return new CountStarTask(haGlue).call(); + return getCountStar(haGlue, false/* useLBS */); } /** + * Report COUNT(*) for the default SPARQL end point for an {@link HAGlue} + * instance. + * + * @param haGlue + * The service. + * @param useLBS + * <code>true</code> iff the load balancer end point should be + * used for the request. + * + * @return The value reported by COUNT(*). + * + * @throws Exception + * @throws IOException + */ + protected long getCountStar(final HAGlue haGlue, final boolean useLBS) + throws IOException, Exception { + + return new CountStarTask(haGlue, useLBS).call(); + + } + + /** * Task reports COUNT(*) for the default SPARQL end point for an * {@link HAGlue} instance. */ protected class CountStarTask implements Callable<Long> { -// /** The service to query. */ -// private final HAGlue haGlue; - /** * The SPARQL end point for that service. */ @@ -647,17 +695,19 @@ /** * @param haGlue * The service to query. - * - * @throws IOException + * @param useLBS + * <code>true</code> iff the load balanced end point should + * be used. + * + * @throws IOException */ - public CountStarTask(final HAGlue haGlue) throws IOException { - -// this.haGlue = haGlue; - + public CountStarTask(final HAGlue haGlue, final boolean useLBS) + throws IOException { + /* * Run query against one of the services. */ - remoteRepo = getRemoteRepository(haGlue); + remoteRepo = getRemoteRepository(haGlue, useLBS); } @@ -665,6 +715,7 @@ * Return the #of triples reported by <code>COUNT(*)</code> for * the SPARQL end point. */ + @Override public Long call() throws Exception { final String query = "SELECT (COUNT(*) AS ?count) WHERE { ?s ?p ?o }"; @@ -678,10 +729,11 @@ // done. final Value v = bs.getBinding("count").getValue(); - return (long) ((org.openrdf.model.Literal) v).intValue(); + return ((org.openrdf.model.Literal) v).longValue(); + } - }; + } /** * Wait until the KB exists. Modified: branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/HAJournal-A.config =================================================================== --- branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/HAJournal-A.config 2014-04-30 18:39:03 UTC (rev 8156) +++ branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/HAJournal-A.config 2014-04-30 18:49:20 UTC (rev 8157) @@ -281,6 +281,9 @@ new NV(AbstractTransactionService.Options.MIN_RELEASE_AGE,"1"), + new NV(com.bigdata.journal.PlatformStatsPlugIn.Options.COLLECT_PLATFORM_STATISTICS,"true"), + new NV(com.bigdata.journal.GangliaPlugIn.Options.GANGLIA_LISTEN,"true"), + }, bigdata.kb); } Modified: branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/HAJournal-B.config =================================================================== --- branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/HAJournal-B.config 2014-04-30 18:39:03 UTC (rev 8156) +++ branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/HAJournal-B.config 2014-04-30 18:49:20 UTC (rev 8157) @@ -280,6 +280,9 @@ new NV(AbstractTransactionService.Options.MIN_RELEASE_AGE,"1"), + new NV(com.bigdata.journal.PlatformStatsPlugIn.Options.COLLECT_PLATFORM_STATISTICS,"true"), + new NV(com.bigdata.journal.GangliaPlugIn.Options.GANGLIA_LISTEN,"true"), + }, bigdata.kb); } Modified: branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/HAJournal-C.config =================================================================== --- branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/HAJournal-C.config 2014-04-30 18:39:03 UTC (rev 8156) +++ branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/HAJournal-C.config 2014-04-30 18:49:20 UTC (rev 8157) @@ -280,6 +280,9 @@ new NV(AbstractTransactionService.Options.MIN_RELEASE_AGE,"1"), + new NV(com.bigdata.journal.PlatformStatsPlugIn.Options.COLLECT_PLATFORM_STATISTICS,"true"), + new NV(com.bigdata.journal.GangliaPlugIn.Options.GANGLIA_LISTEN,"true"), + }, bigdata.kb); } Modified: branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/HAJournalTest.java =================================================================== --- branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/HAJournalTest.java 2014-04-30 18:39:03 UTC (rev 8156) +++ branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/HAJournalTest.java 2014-04-30 18:49:20 UTC (rev 8157) @@ -101,6 +101,8 @@ import com.bigdata.rdf.sail.BigdataSail; import com.bigdata.rdf.sail.BigdataSailRepository; import com.bigdata.rdf.sail.BigdataSailRepositoryConnection; +import com.bigdata.rdf.sail.webapp.HALoadBalancerServlet; +import com.bigdata.rdf.sail.webapp.IHALoadBalancerPolicy; import com.bigdata.rdf.store.AbstractTripleStore; import com.bigdata.service.jini.RemoteDestroyAdmin; @@ -357,6 +359,19 @@ * Variant that does not clear out the last root cause. */ public Throwable getLastRootCause() throws IOException; + + /** + * Set the {@link IHALoadBalancerPolicy} for each active instance of the + * {@link HALoadBalancerServlet}. + * + * @param policy + * The policy. + * + * @throws IOException + */ + public void setHALoadBalancerPolicy(final IHALoadBalancerPolicy policy) + throws IOException; + } /** @@ -830,7 +845,7 @@ } @Override - public long awaitHAReady(long timeout, TimeUnit unit) + public long awaitHAReady(final long timeout, final TimeUnit unit) throws InterruptedException, TimeoutException, AsynchronousQuorumCloseException { @@ -842,7 +857,7 @@ } @Override - public IHARootBlockResponse getRootBlock(IHARootBlockRequest msg) { + public IHARootBlockResponse getRootBlock(final IHARootBlockRequest msg) { checkMethod("getRootBlock", new Class[] { IHARootBlockRequest.class }); @@ -886,7 +901,7 @@ } @Override - public IHADigestResponse computeDigest(IHADigestRequest req) + public IHADigestResponse computeDigest(final IHADigestRequest req) throws IOException, NoSuchAlgorithmException, DigestException { checkMethod("computeDigest", new Class[] { IHADigestRequest.class }); @@ -896,8 +911,9 @@ } @Override - public IHALogDigestResponse computeHALogDigest(IHALogDigestRequest req) - throws IOException, NoSuchAlgorithmException, DigestException { + public IHALogDigestResponse computeHALogDigest( + final IHALogDigestRequest req) throws IOException, + NoSuchAlgorithmException, DigestException { checkMethod("computeHALogDigest", new Class[] { IHALogDigestRequest.class }); @@ -908,7 +924,7 @@ @Override public IHASnapshotDigestResponse computeHASnapshotDigest( - IHASnapshotDigestRequest req) throws IOException, + final IHASnapshotDigestRequest req) throws IOException, NoSuchAlgorithmException, DigestException { checkMethod("computeHASnapshotDigest", @@ -919,8 +935,8 @@ } @Override - public Future<IHASnapshotResponse> takeSnapshot(IHASnapshotRequest req) - throws IOException { + public Future<IHASnapshotResponse> takeSnapshot( + final IHASnapshotRequest req) throws IOException { checkMethod("takeSnapshot", new Class[] { IHASnapshotRequest.class }); @@ -930,7 +946,8 @@ } @Override - public Future<Void> rebuildFromLeader(IHARemoteRebuildRequest req) throws IOException { + public Future<Void> rebuildFromLeader(final IHARemoteRebuildRequest req) + throws IOException { checkMethod("restoreFromLeader", new Class[] { IHARemoteRebuildRequest.class }); @@ -956,7 +973,7 @@ @Override public void gatherMinimumVisibleCommitTime( - IHAGatherReleaseTimeRequest req) throws IOException { + final IHAGatherReleaseTimeRequest req) throws IOException { checkMethod("gatherMinimumVisibleCommitTime", new Class[] { IHAGatherReleaseTimeRequest.class }); @@ -967,7 +984,7 @@ @Override public IHANotifyReleaseTimeResponse notifyEarliestCommitTime( - IHANotifyReleaseTimeRequest req) throws IOException, + final IHANotifyReleaseTimeRequest req) throws IOException, InterruptedException, BrokenBarrierException { checkMethod("notifyEarliestCommitTime", @@ -1070,7 +1087,7 @@ } @Override - public Future<Void> abort2Phase(IHA2PhaseAbortMessage abortMessage) { + public Future<Void> abort2Phase(final IHA2PhaseAbortMessage abortMessage) { checkMethod("abort2Phase", new Class[] { IHA2PhaseAbortMessage.class }); @@ -1137,7 +1154,7 @@ @Override public IHAWriteSetStateResponse getHAWriteSetState( - IHAWriteSetStateRequest req) { + final IHAWriteSetStateRequest req) { checkMethod("getHAWriteSetState", new Class[] { IHAWriteSetStateRequest.class }); @@ -1148,7 +1165,7 @@ @Override public IHALogRootBlocksResponse getHALogRootBlocksForWriteSet( - IHALogRootBlocksRequest msg) throws IOException { + final IHALogRootBlocksRequest msg) throws IOException { checkMethod("getHALogRootBlocksForWriteSet", new Class[] { IHALogRootBlocksRequest.class }); @@ -1158,7 +1175,7 @@ } @Override - public Future<Void> sendHALogForWriteSet(IHALogRequest msg) + public Future<Void> sendHALogForWriteSet(final IHALogRequest msg) throws IOException { checkMethod("sendHALogForWriteSet", @@ -1169,7 +1186,7 @@ } @Override - public Future<IHASendStoreResponse> sendHAStore(IHARebuildRequest msg) + public Future<IHASendStoreResponse> sendHAStore(final IHARebuildRequest msg) throws IOException { checkMethod("sendHAStore", new Class[] { IHARebuildRequest.class }); @@ -1426,6 +1443,20 @@ * @see HAGlueTest#getAndClearLastRootCause() */ private AtomicReference<Throwable> lastRootCause = new AtomicReference<Throwable>(); + + @Override + public void setHALoadBalancerPolicy(final IHALoadBalancerPolicy policy) + throws IOException { + + if (policy == null) + throw new IllegalArgumentException(); + + if (log.isInfoEnabled()) + log.info("Will set LBS policy: " + policy); + + getHAJournalServer().setHALoadBalancerPolicy(policy); + + } } // class HAGlueTestImpl Modified: branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestAll.java =================================================================== --- branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestAll.java 2014-04-30 18:39:03 UTC (rev 8156) +++ branches/RDR/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestAll.java 2014-04-30 18:49:20 UTC (rev 8157) @@ -74,11 +74,6 @@ // Basic tests for a single HAJournalServer (quorum does not meet) suite.addTestSuite(TestHAJournalServer.class); - // HA1 test suite. - suite.addTestSuite(TestHA1JournalServer.class); - suite.addTestSuite(TestHA1SnapshotPolicy.class); - ... [truncated message content] |
From: <tho...@us...> - 2014-04-30 19:13:14
|
Revision: 8159 http://sourceforge.net/p/bigdata/code/8159 Author: thompsonbry Date: 2014-04-30 19:13:09 +0000 (Wed, 30 Apr 2014) Log Message: ----------- {{{ update /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE -r HEAD --force At revision 8158. }}} Note: The last merge into the RDR branch was committed at r8133. The next change to the main branch was at r8137. This merge picks up all changes from r8136 to the head of the main branch. {{{ merge -r 8136:8142 https://svn.code.sf.net/p/bigdata/code/branches/BIGDATA_RELEASE_1_3_0 /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE --- Merging r8136 through r8142 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/java/com/bigdata/bop/bset/ConditionalRoutingOp.java C /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/resources/deployment/brew U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/README.txt --- Merging r8136 through r8142 into /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-rdf/src/java/com/bigdata/rdf/internal U /Users/bryan/Documents/workspace/RDR_CLEAN_FOR_MERGE/bigdata-rdf/src/java/com/bigdata/rdf/internal/constraints/RegexBOp.java Merge complete. ===== File Statistics: ===== Updated: 3 ==== Conflict Statistics: ===== Tree conflicts: 1 }}} @see #526 (RDR) Revision Links: -------------- http://sourceforge.net/p/bigdata/code/8158 http://sourceforge.net/p/bigdata/code/8133 http://sourceforge.net/p/bigdata/code/8137 http://sourceforge.net/p/bigdata/code/8136 http://sourceforge.net/p/bigdata/code/8136 http://sourceforge.net/p/bigdata/code/8142 http://sourceforge.net/p/bigdata/code/8136 http://sourceforge.net/p/bigdata/code/8142 Modified Paths: -------------- branches/RDR/bigdata/src/java/com/bigdata/bop/bset/ConditionalRoutingOp.java branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/README.txt branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/internal/constraints/RegexBOp.java Property Changed: ---------------- branches/RDR/ branches/RDR/bigdata/lib/jetty/ branches/RDR/bigdata/src/java/com/bigdata/bop/aggregate/ branches/RDR/bigdata/src/java/com/bigdata/bop/joinGraph/ branches/RDR/bigdata/src/java/com/bigdata/bop/util/ branches/RDR/bigdata/src/java/com/bigdata/htree/raba/ branches/RDR/bigdata/src/java/com/bigdata/jsr166/ branches/RDR/bigdata/src/test/com/bigdata/bop/joinGraph/ branches/RDR/bigdata/src/test/com/bigdata/bop/util/ branches/RDR/bigdata/src/test/com/bigdata/jsr166/ branches/RDR/bigdata/src/test/com/bigdata/util/httpd/ branches/RDR/bigdata-compatibility/ branches/RDR/bigdata-jini/src/java/com/bigdata/attr/ branches/RDR/bigdata-jini/src/java/com/bigdata/disco/ branches/RDR/bigdata-jini/src/java/com/bigdata/util/config/ branches/RDR/bigdata-perf/ branches/RDR/bigdata-perf/btc/ branches/RDR/bigdata-perf/btc/src/resources/ branches/RDR/bigdata-perf/lubm/ branches/RDR/bigdata-perf/uniprot/ branches/RDR/bigdata-perf/uniprot/src/ branches/RDR/bigdata-rdf/src/java/com/bigdata/bop/rdf/aggregate/ branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/changesets/ branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/error/ branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/internal/ branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/relation/ branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/util/ branches/RDR/bigdata-rdf/src/samples/ branches/RDR/bigdata-rdf/src/test/com/bigdata/bop/rdf/aggregate/ branches/RDR/bigdata-rdf/src/test/com/bigdata/rdf/internal/ branches/RDR/bigdata-rdf/src/test/com/bigdata/rdf/relation/ branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/bench/ branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/changesets/ branches/RDR/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/ branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/bench/ branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/webapp/ branches/RDR/dsi-utils/ branches/RDR/dsi-utils/LEGAL/ branches/RDR/dsi-utils/lib/ branches/RDR/dsi-utils/src/ branches/RDR/dsi-utils/src/java/ branches/RDR/dsi-utils/src/java/it/ branches/RDR/dsi-utils/src/java/it/unimi/ branches/RDR/dsi-utils/src/test/ branches/RDR/dsi-utils/src/test/it/unimi/ branches/RDR/dsi-utils/src/test/it/unimi/dsi/ branches/RDR/lgpl-utils/src/java/it/unimi/dsi/fastutil/bytes/custom/ branches/RDR/lgpl-utils/src/test/it/unimi/dsi/fastutil/bytes/custom/ branches/RDR/osgi/ branches/RDR/src/resources/bin/config/ Index: branches/RDR =================================================================== --- branches/RDR 2014-04-30 18:52:56 UTC (rev 8158) +++ branches/RDR 2014-04-30 19:13:09 UTC (rev 8159) Property changes on: branches/RDR ___________________________________________________________________ Modified: svn:mergeinfo ## -1,6 +1,6 ## /branches/BIGDATA_OPENRDF_2_6_9_UPDATE:6769-6785 /branches/BIGDATA_RELEASE_1_2_0:6766-7380 -/branches/BIGDATA_RELEASE_1_3_0:7665-7913 +/branches/BIGDATA_RELEASE_1_3_0:7665-7913,8137-8142 /branches/BTREE_BUFFER_BRANCH:2004-2045 /branches/DEV_BRANCH_27_OCT_2009:2270-2546,2548-2782 /branches/INT64_BRANCH:4486-4522 \ No newline at end of property Index: branches/RDR/bigdata/lib/jetty =================================================================== --- branches/RDR/bigdata/lib/jetty 2014-04-30 18:52:56 UTC (rev 8158) +++ branches/RDR/bigdata/lib/jetty 2014-04-30 19:13:09 UTC (rev 8159) Property changes on: branches/RDR/bigdata/lib/jetty ___________________________________________________________________ Modified: svn:mergeinfo ## -1,7 +1,7 ## /branches/BIGDATA_MGC_HA1_HA5/bigdata/lib/jetty:8025-8122 /branches/BIGDATA_OPENRDF_2_6_9_UPDATE/bigdata/lib/jetty:6769-6785 /branches/BIGDATA_RELEASE_1_2_0/bigdata/lib/jetty:6766-7380 -/branches/BIGDATA_RELEASE_1_3_0/bigdata/lib/jetty:7665-8131 +/branches/BIGDATA_RELEASE_1_3_0/bigdata/lib/jetty:7665-8131,8137-8142 /branches/INT64_BRANCH/bigdata/lib/jetty:4486-4522 /branches/MGC_1_3_0/bigdata/lib/jetty:7609-7752 /branches/QUADS_QUERY_BRANCH/bigdata/lib/jetty:4525-4531,4533-4548,4550-4584,4586-4609,4611-4632,4634-4643,4646-4672,4674-4685,4687-4693,4697-4735,4737-4782,4784-4792,4794-4796,4798-4801 \ No newline at end of property Index: branches/RDR/bigdata/src/java/com/bigdata/bop/aggregate =================================================================== --- branches/RDR/bigdata/src/java/com/bigdata/bop/aggregate 2014-04-30 18:52:56 UTC (rev 8158) +++ branches/RDR/bigdata/src/java/com/bigdata/bop/aggregate 2014-04-30 19:13:09 UTC (rev 8159) Property changes on: branches/RDR/bigdata/src/java/com/bigdata/bop/aggregate ___________________________________________________________________ Modified: svn:mergeinfo ## -1,7 +1,7 ## /branches/BIGDATA_MGC_HA1_HA5/bigdata/src/java/com/bigdata/bop/aggregate:8025-8122 /branches/BIGDATA_OPENRDF_2_6_9_UPDATE/bigdata/src/java/com/bigdata/bop/aggregate:6769-6785 /branches/BIGDATA_RELEASE_1_2_0/bigdata/src/java/com/bigdata/bop/aggregate:6766-7380 -/branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/bop/aggregate:7665-8131 +/branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/bop/aggregate:7665-8131,8137-8142 /branches/INT64_BRANCH/bigdata/src/java/com/bigdata/bop/aggregate:4486-4522 /branches/MGC_1_3_0/bigdata/src/java/com/bigdata/bop/aggregate:7609-7752 /branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/aggregate:4525-4531,4533-4548,4550-4584,4586-4609,4611-4632,4634-4643,4646-4672,4674-4685,4687-4693,4697-4735,4737-4782,4784-4792,4794-4796,4798-4801 \ No newline at end of property Modified: branches/RDR/bigdata/src/java/com/bigdata/bop/bset/ConditionalRoutingOp.java =================================================================== --- branches/RDR/bigdata/src/java/com/bigdata/bop/bset/ConditionalRoutingOp.java 2014-04-30 18:52:56 UTC (rev 8158) +++ branches/RDR/bigdata/src/java/com/bigdata/bop/bset/ConditionalRoutingOp.java 2014-04-30 19:13:09 UTC (rev 8159) @@ -1,243 +1,251 @@ -/** - -Copyright (C) SYSTAP, LLC 2006-2010. All rights reserved. - -Contact: - SYSTAP, LLC - 4501 Tower Road - Greensboro, NC 27410 - lic...@bi... - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; version 2 of the License. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ -/* - * Created on Aug 25, 2010 - */ - -package com.bigdata.bop.bset; - -import java.util.Arrays; -import java.util.Map; -import java.util.concurrent.Callable; -import java.util.concurrent.FutureTask; - -import com.bigdata.bop.BOp; -import com.bigdata.bop.BOpContext; -import com.bigdata.bop.IBindingSet; -import com.bigdata.bop.IConstraint; -import com.bigdata.bop.NV; -import com.bigdata.bop.PipelineOp; -import com.bigdata.bop.engine.BOpStats; -import com.bigdata.relation.accesspath.IBlockingBuffer; - -import cutthecrap.utils.striterators.ICloseableIterator; - -/** - * An operator for conditional routing of binding sets in a pipeline. The - * operator will copy binding sets either to the default sink (if a condition is - * satisfied) and otherwise to the alternate sink (iff one is specified). If a - * solution fails the constraint and the alternate sink is not specified, then - * the solution is dropped. - * <p> - * Conditional routing can be useful where a different data flow is required - * based on the type of an object (for example a term identifier versus an - * inline term in the RDF database) or where there is a need to jump around a - * join group based on some condition. - * <p> - * Conditional routing will cause reordering of solutions when the alternate - * sink is specified as some solutions will flow to the primary sink while - * others flow to the alterate sink. - * - * @author <a href="mailto:tho...@us...">Bryan Thompson</a> - * @version $Id: ConditionalRoutingOp.java 7773 2014-01-11 12:49:05Z thompsonbry - * $ - */ -public class ConditionalRoutingOp extends PipelineOp { - - /** - * - */ - private static final long serialVersionUID = 1L; - - public interface Annotations extends PipelineOp.Annotations { - - /** - * An {@link IConstraint} which specifies the condition. When the - * condition is satisfied the binding set is routed to the default sink. - * When the condition is not satisfied, the binding set is routed to the - * alternative sink. - */ - String CONDITION = ConditionalRoutingOp.class.getName() + ".condition"; - - } - - /** - * Deep copy constructor. - * - * @param op - */ - public ConditionalRoutingOp(final ConditionalRoutingOp op) { - - super(op); - - } - - /** - * Shallow copy constructor. - * - * @param args - * @param annotations - */ - public ConditionalRoutingOp(final BOp[] args, - final Map<String, Object> annotations) { - - super(args, annotations); - - } - - public ConditionalRoutingOp(final BOp[] args, final NV... anns) { - - this(args, NV.asMap(anns)); - - } - - /** - * @see Annotations#CONDITION - */ - public IConstraint getCondition() { - - return (IConstraint) getProperty(Annotations.CONDITION); - - } - - @Override - public FutureTask<Void> eval(final BOpContext<IBindingSet> context) { - - return new FutureTask<Void>(new ConditionalRouteTask(this, context)); - - } - - /** - * Copy the source to the sink or the alternative sink depending on the - * condition. - */ - static private class ConditionalRouteTask implements Callable<Void> { - - private final BOpStats stats; - - private final IConstraint condition; - - private final ICloseableIterator<IBindingSet[]> source; - - private final IBlockingBuffer<IBindingSet[]> sink; - - private final IBlockingBuffer<IBindingSet[]> sink2; - - ConditionalRouteTask(final ConditionalRoutingOp op, - final BOpContext<IBindingSet> context) { - - this.stats = context.getStats(); - - this.condition = op.getCondition(); - - if (condition == null) - throw new IllegalArgumentException(); - - this.source = context.getSource(); - - this.sink = context.getSink(); - - this.sink2 = context.getSink2(); // MAY be null. - -// if (sink2 == null) -// throw new IllegalArgumentException(); - - if (sink == sink2) - throw new IllegalArgumentException(); - - } - - @Override - public Void call() throws Exception { - try { - while (source.hasNext()) { - - final IBindingSet[] chunk = source.next(); - - stats.chunksIn.increment(); - stats.unitsIn.add(chunk.length); - - final IBindingSet[] def = new IBindingSet[chunk.length]; - final IBindingSet[] alt = sink2 == null ? null - : new IBindingSet[chunk.length]; - - int ndef = 0, nalt = 0; - - for (int i = 0; i < chunk.length; i++) { - - final IBindingSet bset = chunk[i].clone(); - - if (condition.accept(bset)) { - - // solution passes condition. default sink. - def[ndef++] = bset; - - } else if (sink2 != null) { - - // solution fails condition. alternative sink. - alt[nalt++] = bset; - - } - - } - - if (ndef > 0) { - if (ndef == def.length) - sink.add(def); - else - sink.add(Arrays.copyOf(def, ndef)); -// stats.chunksOut.increment(); -// stats.unitsOut.add(ndef); - } - - if (nalt > 0 && sink2 != null) { - if (nalt == alt.length) - sink2.add(alt); - else - sink2.add(Arrays.copyOf(alt, nalt)); -// stats.chunksOut.increment(); -// stats.unitsOut.add(nalt); - } - - } - - sink.flush(); - if (sink2 != null) - sink2.flush(); - - return null; - - } finally { - source.close(); - sink.close(); - if (sink2 != null) - sink2.close(); - - } - - } // call() - - } // ConditionalRoutingTask. - -} +/** + +Copyright (C) SYSTAP, LLC 2006-2010. All rights reserved. + +Contact: + SYSTAP, LLC + 4501 Tower Road + Greensboro, NC 27410 + lic...@bi... + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; version 2 of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* + * Created on Aug 25, 2010 + */ + +package com.bigdata.bop.bset; + +import java.util.Arrays; +import java.util.Map; +import java.util.concurrent.Callable; +import java.util.concurrent.FutureTask; + +import com.bigdata.bop.BOp; +import com.bigdata.bop.BOpContext; +import com.bigdata.bop.IBindingSet; +import com.bigdata.bop.IConstraint; +import com.bigdata.bop.NV; +import com.bigdata.bop.PipelineOp; +import com.bigdata.bop.engine.BOpStats; +import com.bigdata.relation.accesspath.IBlockingBuffer; + +import cutthecrap.utils.striterators.ICloseableIterator; + +/** + * An operator for conditional routing of binding sets in a pipeline. The + * operator will copy binding sets either to the default sink (if a condition is + * satisfied) and otherwise to the alternate sink (iff one is specified). If a + * solution fails the constraint and the alternate sink is not specified, then + * the solution is dropped. + * <p> + * Conditional routing can be useful where a different data flow is required + * based on the type of an object (for example a term identifier versus an + * inline term in the RDF database) or where there is a need to jump around a + * join group based on some condition. + * <p> + * Conditional routing will cause reordering of solutions when the alternate + * sink is specified as some solutions will flow to the primary sink while + * others flow to the alterate sink. + * + * @author <a href="mailto:tho...@us...">Bryan Thompson</a> + * @version $Id: ConditionalRoutingOp.java 7773 2014-01-11 12:49:05Z thompsonbry + * $ + */ +public class ConditionalRoutingOp extends PipelineOp { + + /** + * + */ + private static final long serialVersionUID = 1L; + + public interface Annotations extends PipelineOp.Annotations { + + /** + * An {@link IConstraint} which specifies the condition. When the + * condition is satisfied the binding set is routed to the default sink. + * When the condition is not satisfied, the binding set is routed to the + * alternative sink. + */ + String CONDITION = ConditionalRoutingOp.class.getName() + ".condition"; + + } + + /** + * Deep copy constructor. + * + * @param op + */ + public ConditionalRoutingOp(final ConditionalRoutingOp op) { + + super(op); + + } + + /** + * Shallow copy constructor. + * + * @param args + * @param annotations + */ + public ConditionalRoutingOp(final BOp[] args, + final Map<String, Object> annotations) { + + super(args, annotations); + + } + + public ConditionalRoutingOp(final BOp[] args, final NV... anns) { + + this(args, NV.asMap(anns)); + + } + + /** + * @see Annotations#CONDITION + */ + public IConstraint getCondition() { + + return (IConstraint) getProperty(Annotations.CONDITION); + + } + + @Override + public FutureTask<Void> eval(final BOpContext<IBindingSet> context) { + + return new FutureTask<Void>(new ConditionalRouteTask(this, context)); + + } + + /** + * Copy the source to the sink or the alternative sink depending on the + * condition. + */ + static private class ConditionalRouteTask implements Callable<Void> { + + private final BOpStats stats; + + private final IConstraint condition; + + private final ICloseableIterator<IBindingSet[]> source; + + private final IBlockingBuffer<IBindingSet[]> sink; + + private final IBlockingBuffer<IBindingSet[]> sink2; + + ConditionalRouteTask(final ConditionalRoutingOp op, + final BOpContext<IBindingSet> context) { + + this.stats = context.getStats(); + + this.condition = op.getCondition(); + + if (condition == null) + throw new IllegalArgumentException(); + + this.source = context.getSource(); + + this.sink = context.getSink(); + + this.sink2 = context.getSink2(); // MAY be null. + +// if (sink2 == null) +// throw new IllegalArgumentException(); + + if (sink == sink2) + throw new IllegalArgumentException(); + + } + + @Override + public Void call() throws Exception { + try { + while (source.hasNext()) { + + final IBindingSet[] chunk = source.next(); + + stats.chunksIn.increment(); + stats.unitsIn.add(chunk.length); + + final IBindingSet[] def = new IBindingSet[chunk.length]; + final IBindingSet[] alt = sink2 == null ? null + : new IBindingSet[chunk.length]; + + int ndef = 0, nalt = 0; + + for (int i = 0; i < chunk.length; i++) { + + if (i % 20 == 0 && Thread.interrupted()) { + + // Eagerly notice if the operator is interrupted. + throw new RuntimeException( + new InterruptedException()); + + } + + final IBindingSet bset = chunk[i].clone(); + + if (condition.accept(bset)) { + + // solution passes condition. default sink. + def[ndef++] = bset; + + } else if (sink2 != null) { + + // solution fails condition. alternative sink. + alt[nalt++] = bset; + + } + + } + + if (ndef > 0) { + if (ndef == def.length) + sink.add(def); + else + sink.add(Arrays.copyOf(def, ndef)); +// stats.chunksOut.increment(); +// stats.unitsOut.add(ndef); + } + + if (nalt > 0 && sink2 != null) { + if (nalt == alt.length) + sink2.add(alt); + else + sink2.add(Arrays.copyOf(alt, nalt)); +// stats.chunksOut.increment(); +// stats.unitsOut.add(nalt); + } + + } + + sink.flush(); + if (sink2 != null) + sink2.flush(); + + return null; + + } finally { + source.close(); + sink.close(); + if (sink2 != null) + sink2.close(); + + } + + } // call() + + } // ConditionalRoutingTask. + +} Index: branches/RDR/bigdata/src/java/com/bigdata/bop/joinGraph =================================================================== --- branches/RDR/bigdata/src/java/com/bigdata/bop/joinGraph 2014-04-30 18:52:56 UTC (rev 8158) +++ branches/RDR/bigdata/src/java/com/bigdata/bop/joinGraph 2014-04-30 19:13:09 UTC (rev 8159) Property changes on: branches/RDR/bigdata/src/java/com/bigdata/bop/joinGraph ___________________________________________________________________ Modified: svn:mergeinfo ## -1,7 +1,7 ## /branches/BIGDATA_MGC_HA1_HA5/bigdata/src/java/com/bigdata/bop/joinGraph:8025-8122 /branches/BIGDATA_OPENRDF_2_6_9_UPDATE/bigdata/src/java/com/bigdata/bop/joinGraph:6769-6785 /branches/BIGDATA_RELEASE_1_2_0/bigdata/src/java/com/bigdata/bop/joinGraph:6766-7380 -/branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/bop/joinGraph:7665-8131 +/branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/bop/joinGraph:7665-8131,8137-8142 /branches/INT64_BRANCH/bigdata/src/java/com/bigdata/bop/joinGraph:4486-4522 /branches/MGC_1_3_0/bigdata/src/java/com/bigdata/bop/joinGraph:7609-7752 /branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/joinGraph:4525-4531,4533-4548,4550-4584,4586-4609,4611-4632,4634-4643,4646-4672,4674-4685,4687-4693,4697-4735,4737-4782,4784-4792,4794-4796,4798-4801 \ No newline at end of property Index: branches/RDR/bigdata/src/java/com/bigdata/bop/util =================================================================== --- branches/RDR/bigdata/src/java/com/bigdata/bop/util 2014-04-30 18:52:56 UTC (rev 8158) +++ branches/RDR/bigdata/src/java/com/bigdata/bop/util 2014-04-30 19:13:09 UTC (rev 8159) Property changes on: branches/RDR/bigdata/src/java/com/bigdata/bop/util ___________________________________________________________________ Modified: svn:mergeinfo ## -1,7 +1,7 ## /branches/BIGDATA_MGC_HA1_HA5/bigdata/src/java/com/bigdata/bop/util:8025-8122 /branches/BIGDATA_OPENRDF_2_6_9_UPDATE/bigdata/src/java/com/bigdata/bop/util:6769-6785 /branches/BIGDATA_RELEASE_1_2_0/bigdata/src/java/com/bigdata/bop/util:6766-7380 -/branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/bop/util:7665-8131 +/branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/bop/util:7665-8131,8137-8142 /branches/INT64_BRANCH/bigdata/src/java/com/bigdata/bop/util:4486-4522 /branches/MGC_1_3_0/bigdata/src/java/com/bigdata/bop/util:7609-7752 /branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/util:4525-4531,4533-4548,4550-4584,4586-4609,4611-4632,4634-4643,4646-4672,4674-4685,4687-4693,4697-4735,4737-4782,4784-4792,4794-4796,4798-4801 \ No newline at end of property Index: branches/RDR/bigdata/src/java/com/bigdata/htree/raba =================================================================== --- branches/RDR/bigdata/src/java/com/bigdata/htree/raba 2014-04-30 18:52:56 UTC (rev 8158) +++ branches/RDR/bigdata/src/java/com/bigdata/htree/raba 2014-04-30 19:13:09 UTC (rev 8159) Property changes on: branches/RDR/bigdata/src/java/com/bigdata/htree/raba ___________________________________________________________________ Modified: svn:mergeinfo ## -1,7 +1,7 ## /branches/BIGDATA_MGC_HA1_HA5/bigdata/src/java/com/bigdata/htree/raba:8025-8122 /branches/BIGDATA_OPENRDF_2_6_9_UPDATE/bigdata/src/java/com/bigdata/htree/raba:6769-6785 /branches/BIGDATA_RELEASE_1_2_0/bigdata/src/java/com/bigdata/htree/raba:6766-7380 -/branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/htree/raba:7665-8131 +/branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/htree/raba:7665-8131,8137-8142 /branches/INT64_BRANCH/bigdata/src/java/com/bigdata/htree/raba:4486-4522 /branches/MGC_1_3_0/bigdata/src/java/com/bigdata/htree/raba:7609-7752 /branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/htree/raba:4525-4531,4533-4548,4550-4584,4586-4609,4611-4632,4634-4643,4646-4672,4674-4685,4687-4693,4697-4735,4737-4782,4784-4792,4794-4796,4798-4801 \ No newline at end of property Index: branches/RDR/bigdata/src/java/com/bigdata/jsr166 =================================================================== --- branches/RDR/bigdata/src/java/com/bigdata/jsr166 2014-04-30 18:52:56 UTC (rev 8158) +++ branches/RDR/bigdata/src/java/com/bigdata/jsr166 2014-04-30 19:13:09 UTC (rev 8159) Property changes on: branches/RDR/bigdata/src/java/com/bigdata/jsr166 ___________________________________________________________________ Modified: svn:mergeinfo ## -1,7 +1,7 ## /branches/BIGDATA_MGC_HA1_HA5/bigdata/src/java/com/bigdata/jsr166:8025-8122 /branches/BIGDATA_OPENRDF_2_6_9_UPDATE/bigdata/src/java/com/bigdata/jsr166:6769-6785 /branches/BIGDATA_RELEASE_1_2_0/bigdata/src/java/com/bigdata/jsr166:6766-7380 -/branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/jsr166:7665-8131 +/branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/jsr166:7665-8131,8137-8142 /branches/INT64_BRANCH/bigdata/src/java/com/bigdata/jsr166:4486-4522 /branches/MGC_1_3_0/bigdata/src/java/com/bigdata/jsr166:7609-7752 /branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/jsr166:4525-4531,4533-4548,4550-4584,4586-4609,4611-4632,4634-4643,4646-4672,4674-4685,4687-4693,4697-4735,4737-4782,4784-4792,4794-4796,4798-4801 \ No newline at end of property Modified: branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/README.txt =================================================================== --- branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/README.txt 2014-04-30 18:52:56 UTC (rev 8158) +++ branches/RDR/bigdata/src/resources/deployment/vagrant/systap-aws-bigdata-ha/README.txt 2014-04-30 19:13:09 UTC (rev 8159) @@ -46,11 +46,12 @@ ------------- The "Boto" python library for the AWS API must be installed in order to instantiate the cluster. If not already installed: - % pip install boto + % sudo pip install pycrypto + % sudo pip install boto alternately: - % easy_install boto + % sudo easy_install boto If while running the python scripts the error message appears "ImportError: No module named boto", you will need to set the Index: branches/RDR/bigdata/src/test/com/bigdata/bop/joinGraph =================================================================== --- branches/RDR/bigdata/src/test/com/bigdata/bop/joinGraph 2014-04-30 18:52:56 UTC (rev 8158) +++ branches/RDR/bigdata/src/test/com/bigdata/bop/joinGraph 2014-04-30 19:13:09 UTC (rev 8159) Property changes on: branches/RDR/bigdata/src/test/com/bigdata/bop/joinGraph ___________________________________________________________________ Modified: svn:mergeinfo ## -1,7 +1,7 ## /branches/BIGDATA_MGC_HA1_HA5/bigdata/src/test/com/bigdata/bop/joinGraph:8025-8122 /branches/BIGDATA_OPENRDF_2_6_9_UPDATE/bigdata/src/test/com/bigdata/bop/joinGraph:6769-6785 /branches/BIGDATA_RELEASE_1_2_0/bigdata/src/test/com/bigdata/bop/joinGraph:6766-7380 -/branches/BIGDATA_RELEASE_1_3_0/bigdata/src/test/com/bigdata/bop/joinGraph:7665-8131 +/branches/BIGDATA_RELEASE_1_3_0/bigdata/src/test/com/bigdata/bop/joinGraph:7665-8131,8137-8142 /branches/INT64_BRANCH/bigdata/src/test/com/bigdata/bop/joinGraph:4486-4522 /branches/MGC_1_3_0/bigdata/src/test/com/bigdata/bop/joinGraph:7609-7752 /branches/QUADS_QUERY_BRANCH/bigdata/src/test/com/bigdata/bop/joinGraph:4525-4531,4533-4548,4550-4584,4586-4609,4611-4632,4634-4643,4646-4672,4674-4685,4687-4693,4697-4735,4737-4782,4784-4792,4794-4796,4798-4801 \ No newline at end of property Index: branches/RDR/bigdata/src/test/com/bigdata/bop/util =================================================================== --- branches/RDR/bigdata/src/test/com/bigdata/bop/util 2014-04-30 18:52:56 UTC (rev 8158) +++ branches/RDR/bigdata/src/test/com/bigdata/bop/util 2014-04-30 19:13:09 UTC (rev 8159) Property changes on: branches/RDR/bigdata/src/test/com/bigdata/bop/util ___________________________________________________________________ Modified: svn:mergeinfo ## -1,7 +1,7 ## /branches/BIGDATA_MGC_HA1_HA5/bigdata/src/test/com/bigdata/bop/util:8025-8122 /branches/BIGDATA_OPENRDF_2_6_9_UPDATE/bigdata/src/test/com/bigdata/bop/util:6769-6785 /branches/BIGDATA_RELEASE_1_2_0/bigdata/src/test/com/bigdata/bop/util:6766-7380 -/branches/BIGDATA_RELEASE_1_3_0/bigdata/src/test/com/bigdata/bop/util:7665-8131 +/branches/BIGDATA_RELEASE_1_3_0/bigdata/src/test/com/bigdata/bop/util:7665-8131,8137-8142 /branches/INT64_BRANCH/bigdata/src/test/com/bigdata/bop/util:4486-4522 /branches/MGC_1_3_0/bigdata/src/test/com/bigdata/bop/util:7609-7752 /branches/QUADS_QUERY_BRANCH/bigdata/src/test/com/bigdata/bop/util:4525-4531,4533-4548,4550-4584,4586-4609,4611-4632,4634-4643,4646-4672,4674-4685,4687-4693,4697-4735,4737-4782,4784-4792,4794-4796,4798-4801 \ No newline at end of property Index: branches/RDR/bigdata/src/test/com/bigdata/jsr166 =================================================================== --- branches/RDR/bigdata/src/test/com/bigdata/jsr166 2014-04-30 18:52:56 UTC (rev 8158) +++ branches/RDR/bigdata/src/test/com/bigdata/jsr166 2014-04-30 19:13:09 UTC (rev 8159) Property changes on: branches/RDR/bigdata/src/test/com/bigdata/jsr166 ___________________________________________________________________ Modified: svn:mergeinfo ## -1,7 +1,7 ## /branches/BIGDATA_MGC_HA1_HA5/bigdata/src/test/com/bigdata/jsr166:8025-8122 /branches/BIGDATA_OPENRDF_2_6_9_UPDATE/bigdata/src/test/com/bigdata/jsr166:6769-6785 /branches/BIGDATA_RELEASE_1_2_0/bigdata/src/test/com/bigdata/jsr166:6766-7380 -/branches/BIGDATA_RELEASE_1_3_0/bigdata/src/test/com/bigdata/jsr166:7665-8131 +/branches/BIGDATA_RELEASE_1_3_0/bigdata/src/test/com/bigdata/jsr166:7665-8131,8137-8142 /branches/INT64_BRANCH/bigdata/src/test/com/bigdata/jsr166:4486-4522 /branches/MGC_1_3_0/bigdata/src/test/com/bigdata/jsr166:7609-7752 /branches/QUADS_QUERY_BRANCH/bigdata/src/test/com/bigdata/jsr166:4525-4531,4533-4548,4550-4584,4586-4609,4611-4632,4634-4643,4646-4672,4674-4685,4687-4693,4697-4735,4737-4782,4784-4792,4794-4796,4798-4801 \ No newline at end of property Index: branches/RDR/bigdata/src/test/com/bigdata/util/httpd =================================================================== --- branches/RDR/bigdata/src/test/com/bigdata/util/httpd 2014-04-30 18:52:56 UTC (rev 8158) +++ branches/RDR/bigdata/src/test/com/bigdata/util/httpd 2014-04-30 19:13:09 UTC (rev 8159) Property changes on: branches/RDR/bigdata/src/test/com/bigdata/util/httpd ___________________________________________________________________ Modified: svn:mergeinfo ## -1,7 +1,7 ## /branches/BIGDATA_MGC_HA1_HA5/bigdata/src/test/com/bigdata/util/httpd:8025-8122 /branches/BIGDATA_OPENRDF_2_6_9_UPDATE/bigdata/src/test/com/bigdata/util/httpd:6769-6785 /branches/BIGDATA_RELEASE_1_2_0/bigdata/src/test/com/bigdata/util/httpd:6766-7380 -/branches/BIGDATA_RELEASE_1_3_0/bigdata/src/test/com/bigdata/util/httpd:7665-8131 +/branches/BIGDATA_RELEASE_1_3_0/bigdata/src/test/com/bigdata/util/httpd:7665-8131,8137-8142 /branches/INT64_BRANCH/bigdata/src/test/com/bigdata/util/httpd:4486-4522 /branches/MGC_1_3_0/bigdata/src/test/com/bigdata/util/httpd:7609-7752 /branches/QUADS_QUERY_BRANCH/bigdata/src/test/com/bigdata/util/httpd:4525-4531,4533-4548,4550-4584,4586-4609,4611-4632,4634-4643,4646-4672,4674-4685,4687-4693,4697-4735,4737-4782,4784-4792,4794-4796,4798-4801 \ No newline at end of property Index: branches/RDR/bigdata-compatibility =================================================================== --- branches/RDR/bigdata-compatibility 2014-04-30 18:52:56 UTC (rev 8158) +++ branches/RDR/bigdata-compatibility 2014-04-30 19:13:09 UTC (rev 8159) Property changes on: branches/RDR/bigdata-compatibility ___________________________________________________________________ Modified: svn:mergeinfo ## -1,7 +1,7 ## /branches/BIGDATA_MGC_HA1_HA5/bigdata-compatibility:8025-8122 /branches/BIGDATA_OPENRDF_2_6_9_UPDATE/bigdata-compatibility:6769-6785 /branches/BIGDATA_RELEASE_1_2_0/bigdata-compatibility:6766-7380 -/branches/BIGDATA_RELEASE_1_3_0/bigdata-compatibility:7665-8131 +/branches/BIGDATA_RELEASE_1_3_0/bigdata-compatibility:7665-8131,8137-8142 /branches/INT64_BRANCH/bigdata-compatibility:4486-4522 /branches/LARGE_LITERALS_REFACTOR/bigdata-compatibility:4175-4387 /branches/MGC_1_3_0/bigdata-compatibility:7609-7752 \ No newline at end of property Index: branches/RDR/bigdata-jini/src/java/com/bigdata/attr =================================================================== --- branches/RDR/bigdata-jini/src/java/com/bigdata/attr 2014-04-30 18:52:56 UTC (rev 8158) +++ branches/RDR/bigdata-jini/src/java/com/bigdata/attr 2014-04-30 19:13:09 UTC (rev 8159) Property changes on: branches/RDR/bigdata-jini/src/java/com/bigdata/attr ___________________________________________________________________ Modified: svn:mergeinfo ## -1,7 +1,7 ## /branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/java/com/bigdata/attr:8025-8122 /branches/BIGDATA_OPENRDF_2_6_9_UPDATE/bigdata-jini/src/java/com/bigdata/attr:6769-6785 /branches/BIGDATA_RELEASE_1_2_0/bigdata-jini/src/java/com/bigdata/attr:6766-7380 -/branches/BIGDATA_RELEASE_1_3_0/bigdata-jini/src/java/com/bigdata/attr:7665-8131 +/branches/BIGDATA_RELEASE_1_3_0/bigdata-jini/src/java/com/bigdata/attr:7665-8131,8137-8142 /branches/BTREE_BUFFER_BRANCH/bigdata-jini/src/java/com/bigdata/attr:2004-2045 /branches/DEV_BRANCH_27_OCT_2009/bigdata-jini/src/java/com/bigdata/attr:2270-2546,2548-2782 /branches/INT64_BRANCH/bigdata-jini/src/java/com/bigdata/attr:4486-4522 \ No newline at end of property Index: branches/RDR/bigdata-jini/src/java/com/bigdata/disco =================================================================== --- branches/RDR/bigdata-jini/src/java/com/bigdata/disco 2014-04-30 18:52:56 UTC (rev 8158) +++ branches/RDR/bigdata-jini/src/java/com/bigdata/disco 2014-04-30 19:13:09 UTC (rev 8159) Property changes on: branches/RDR/bigdata-jini/src/java/com/bigdata/disco ___________________________________________________________________ Modified: svn:mergeinfo ## -1,7 +1,7 ## /branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/java/com/bigdata/disco:8025-8122 /branches/BIGDATA_OPENRDF_2_6_9_UPDATE/bigdata-jini/src/java/com/bigdata/disco:6769-6785 /branches/BIGDATA_RELEASE_1_2_0/bigdata-jini/src/java/com/bigdata/disco:6766-7380 -/branches/BIGDATA_RELEASE_1_3_0/bigdata-jini/src/java/com/bigdata/disco:7665-8131 +/branches/BIGDATA_RELEASE_1_3_0/bigdata-jini/src/java/com/bigdata/disco:7665-8131,8137-8142 /branches/BTREE_BUFFER_BRANCH/bigdata-jini/src/java/com/bigdata/disco:2004-2045 /branches/DEV_BRANCH_27_OCT_2009/bigdata-jini/src/java/com/bigdata/disco:2270-2546,2548-2782 /branches/INT64_BRANCH/bigdata-jini/src/java/com/bigdata/disco:4486-4522 \ No newline at end of property Index: branches/RDR/bigdata-jini/src/java/com/bigdata/util/config =================================================================== --- branches/RDR/bigdata-jini/src/java/com/bigdata/util/config 2014-04-30 18:52:56 UTC (rev 8158) +++ branches/RDR/bigdata-jini/src/java/com/bigdata/util/config 2014-04-30 19:13:09 UTC (rev 8159) Property changes on: branches/RDR/bigdata-jini/src/java/com/bigdata/util/config ___________________________________________________________________ Modified: svn:mergeinfo ## -1,7 +1,7 ## /branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/java/com/bigdata/util/config:8025-8122 /branches/BIGDATA_OPENRDF_2_6_9_UPDATE/bigdata-jini/src/java/com/bigdata/util/config:6769-6785 /branches/BIGDATA_RELEASE_1_2_0/bigdata-jini/src/java/com/bigdata/util/config:6766-7380 -/branches/BIGDATA_RELEASE_1_3_0/bigdata-jini/src/java/com/bigdata/util/config:7665-8131 +/branches/BIGDATA_RELEASE_1_3_0/bigdata-jini/src/java/com/bigdata/util/config:7665-8131,8137-8142 /branches/BTREE_BUFFER_BRANCH/bigdata-jini/src/java/com/bigdata/util/config:2004-2045 /branches/DEV_BRANCH_27_OCT_2009/bigdata-jini/src/java/com/bigdata/util/config:2270-2546,2548-2782 /branches/INT64_BRANCH/bigdata-jini/src/java/com/bigdata/util/config:4486-4522 \ No newline at end of property Index: branches/RDR/bigdata-perf =================================================================== --- branches/RDR/bigdata-perf 2014-04-30 18:52:56 UTC (rev 8158) +++ branches/RDR/bigdata-perf 2014-04-30 19:13:09 UTC (rev 8159) Property changes on: branches/RDR/bigdata-perf ___________________________________________________________________ Modified: svn:mergeinfo ## -1,7 +1,7 ## /branches/BIGDATA_MGC_HA1_HA5/bigdata-perf:8025-8122 /branches/BIGDATA_OPENRDF_2_6_9_UPDATE/bigdata-perf:6769-6785 /branches/BIGDATA_RELEASE_1_2_0/bigdata-perf:6766-7380 -/branches/BIGDATA_RELEASE_1_3_0/bigdata-perf:7665-8131 +/branches/BIGDATA_RELEASE_1_3_0/bigdata-perf:7665-8131,8137-8142 /branches/BTREE_BUFFER_BRANCH/bigdata-perf:2004-2045 /branches/DEV_BRANCH_27_OCT_2009/bigdata-perf:2270-2546,2548-2782 /branches/INT64_BRANCH/bigdata-perf:4486-4522 \ No newline at end of property Index: branches/RDR/bigdata-perf/btc =================================================================== --- branches/RDR/bigdata-perf/btc 2014-04-30 18:52:56 UTC (rev 8158) +++ branches/RDR/bigdata-perf/btc 2014-04-30 19:13:09 UTC (rev 8159) Property changes on: branches/RDR/bigdata-perf/btc ___________________________________________________________________ Modified: svn:mergeinfo ## -1,7 +1,7 ## /branches/BIGDATA_MGC_HA1_HA5/bigdata-perf/btc:8025-8122 /branches/BIGDATA_OPENRDF_2_6_9_UPDATE/bigdata-perf/btc:6769-6785 /branches/BIGDATA_RELEASE_1_2_0/bigdata-perf/btc:6766-7380 -/branches/BIGDATA_RELEASE_1_3_0/bigdata-perf/btc:7665-8131 +/branches/BIGDATA_RELEASE_1_3_0/bigdata-perf/btc:7665-8131,8137-8142 /branches/INT64_BRANCH/bigdata-perf/btc:4486-4522 /branches/JOURNAL_HA_BRANCH/bigdata-perf/btc:2596-4066 /branches/LARGE_LITERALS_REFACTOR/bigdata-perf/btc:4175-4387 \ No newline at end of property Index: branches/RDR/bigdata-perf/btc/src/resources =================================================================== --- branches/RDR/bigdata-perf/btc/src/resources 2014-04-30 18:52:56 UTC (rev 8158) +++ branches/RDR/bigdata-perf/btc/src/resources 2014-04-30 19:13:09 UTC (rev 8159) Property changes on: branches/RDR/bigdata-perf/btc/src/resources ___________________________________________________________________ Modified: svn:mergeinfo ## -1,7 +1,7 ## /branches/BIGDATA_MGC_HA1_HA5/bigdata-perf/btc/src/resources:8025-8122 /branches/BIGDATA_OPENRDF_2_6_9_UPDATE/bigdata-perf/btc/src/resources:6769-6785 /branches/BIGDATA_RELEASE_1_2_0/bigdata-perf/btc/src/resources:6766-7380 -/branches/BIGDATA_RELEASE_1_3_0/bigdata-perf/btc/src/resources:7665-8131 +/branches/BIGDATA_RELEASE_1_3_0/bigdata-perf/btc/src/resources:7665-8131,8137-8142 /branches/INT64_BRANCH/bigdata-perf/btc/src/resources:4486-4522 /branches/JOURNAL_HA_BRANCH/bigdata-perf/btc/src/resources:2596-4066 /branches/LARGE_LITERALS_REFACTOR/bigdata-perf/btc/src/resources:4175-4387 \ No newline at end of property Index: branches/RDR/bigdata-perf/lubm =================================================================== --- branches/RDR/bigdata-perf/lubm 2014-04-30 18:52:56 UTC (rev 8158) +++ branches/RDR/bigdata-perf/lubm 2014-04-30 19:13:09 UTC (rev 8159) Property changes on: branches/RDR/bigdata-perf/lubm ___________________________________________________________________ Modified: svn:mergeinfo ## -1,7 +1,7 ## /branches/BIGDATA_MGC_HA1_HA5/bigdata-perf/lubm:8025-8122 /branches/BIGDATA_OPENRDF_2_6_9_UPDATE/bigdata-perf/lubm:6769-6785 /branches/BIGDATA_RELEASE_1_2_0/bigdata-perf/lubm:6766-7380 -/branches/BIGDATA_RELEASE_1_3_0/bigdata-perf/lubm:7665-8131 +/branches/BIGDATA_RELEASE_1_3_0/bigdata-perf/lubm:7665-8131,8137-8142 /branches/INT64_BRANCH/bigdata-perf/lubm:4486-4522 /branches/LARGE_LITERALS_REFACTOR/bigdata-perf/lubm:4175-4387 /branches/MGC_1_3_0/bigdata-perf/lubm:7609-7752 \ No newline at end of property Index: branches/RDR/bigdata-perf/uniprot =================================================================== --- branches/RDR/bigdata-perf/uniprot 2014-04-30 18:52:56 UTC (rev 8158) +++ branches/RDR/bigdata-perf/uniprot 2014-04-30 19:13:09 UTC (rev 8159) Property changes on: branches/RDR/bigdata-perf/uniprot ___________________________________________________________________ Modified: svn:mergeinfo ## -1,7 +1,7 ## /branches/BIGDATA_MGC_HA1_HA5/bigdata-perf/uniprot:8025-8122 /branches/BIGDATA_OPENRDF_2_6_9_UPDATE/bigdata-perf/uniprot:6769-6785 /branches/BIGDATA_RELEASE_1_2_0/bigdata-perf/uniprot:6766-7380 -/branches/BIGDATA_RELEASE_1_3_0/bigdata-perf/uniprot:7665-8131 +/branches/BIGDATA_RELEASE_1_3_0/bigdata-perf/uniprot:7665-8131,8137-8142 /branches/INT64_BRANCH/bigdata-perf/uniprot:4486-4522 /branches/JOURNAL_HA_BRANCH/bigdata-perf/uniprot:2596-4066 /branches/LARGE_LITERALS_REFACTOR/bigdata-perf/uniprot:4175-4387 \ No newline at end of property Index: branches/RDR/bigdata-perf/uniprot/src =================================================================== --- branches/RDR/bigdata-perf/uniprot/src 2014-04-30 18:52:56 UTC (rev 8158) +++ branches/RDR/bigdata-perf/uniprot/src 2014-04-30 19:13:09 UTC (rev 8159) Property changes on: branches/RDR/bigdata-perf/uniprot/src ___________________________________________________________________ Modified: svn:mergeinfo ## -1,7 +1,7 ## /branches/BIGDATA_MGC_HA1_HA5/bigdata-perf/uniprot/src:8025-8122 /branches/BIGDATA_OPENRDF_2_6_9_UPDATE/bigdata-perf/uniprot/src:6769-6785 /branches/BIGDATA_RELEASE_1_2_0/bigdata-perf/uniprot/src:6766-7380 -/branches/BIGDATA_RELEASE_1_3_0/bigdata-perf/uniprot/src:7665-8131 +/branches/BIGDATA_RELEASE_1_3_0/bigdata-perf/uniprot/src:7665-8131,8137-8142 /branches/INT64_BRANCH/bigdata-perf/uniprot/src:4486-4522 /branches/JOURNAL_HA_BRANCH/bigdata-perf/uniprot/src:2596-4066 /branches/LARGE_LITERALS_REFACTOR/bigdata-perf/uniprot/src:4175-4387 \ No newline at end of property Index: branches/RDR/bigdata-rdf/src/java/com/bigdata/bop/rdf/aggregate =================================================================== --- branches/RDR/bigdata-rdf/src/java/com/bigdata/bop/rdf/aggregate 2014-04-30 18:52:56 UTC (rev 8158) +++ branches/RDR/bigdata-rdf/src/java/com/bigdata/bop/rdf/aggregate 2014-04-30 19:13:09 UTC (rev 8159) Property changes on: branches/RDR/bigdata-rdf/src/java/com/bigdata/bop/rdf/aggregate ___________________________________________________________________ Modified: svn:mergeinfo ## -1,7 +1,7 ## /branches/BIGDATA_MGC_HA1_HA5/bigdata-rdf/src/java/com/bigdata/bop/rdf/aggregate:8025-8122 /branches/BIGDATA_OPENRDF_2_6_9_UPDATE/bigdata-rdf/src/java/com/bigdata/bop/rdf/aggregate:6769-6785 /branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/java/com/bigdata/bop/rdf/aggregate:6766-7380 -/branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/java/com/bigdata/bop/rdf/aggregate:7665-8131 +/branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/java/com/bigdata/bop/rdf/aggregate:7665-8131,8137-8142 /branches/INT64_BRANCH/bigdata-rdf/src/java/com/bigdata/bop/rdf/aggregate:4486-4522 /branches/MGC_1_3_0/bigdata-rdf/src/java/com/bigdata/bop/rdf/aggregate:7609-7752 /branches/QUADS_QUERY_BRANCH/bigdata-rdf/src/java/com/bigdata/bop/rdf/aggregate:4525-4531,4533-4548,4550-4584,4586-4609,4611-4632,4634-4643,4646-4672,4674-4685,4687-4693,4697-4735,4737-4782,4784-4792,4794-4796,4798-4801 \ No newline at end of property Index: branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/changesets =================================================================== --- branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/changesets 2014-04-30 18:52:56 UTC (rev 8158) +++ branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/changesets 2014-04-30 19:13:09 UTC (rev 8159) Property changes on: branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/changesets ___________________________________________________________________ Modified: svn:mergeinfo ## -1,7 +1,7 ## /branches/BIGDATA_MGC_HA1_HA5/bigdata-rdf/src/java/com/bigdata/rdf/changesets:8025-8122 /branches/BIGDATA_OPENRDF_2_6_9_UPDATE/bigdata-rdf/src/java/com/bigdata/rdf/changesets:6769-6785 /branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/java/com/bigdata/rdf/changesets:6766-7380 -/branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/java/com/bigdata/rdf/changesets:7665-8131 +/branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/java/com/bigdata/rdf/changesets:7665-8131,8137-8142 /branches/INT64_BRANCH/bigdata-rdf/src/java/com/bigdata/rdf/changesets:4486-4522 /branches/LARGE_LITERALS_REFACTOR/bigdata-rdf/src/java/com/bigdata/rdf/changesets:4175-4387 /branches/MGC_1_3_0/bigdata-rdf/src/java/com/bigdata/rdf/changesets:7609-7752 \ No newline at end of property Index: branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/error =================================================================== --- branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/error 2014-04-30 18:52:56 UTC (rev 8158) +++ branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/error 2014-04-30 19:13:09 UTC (rev 8159) Property changes on: branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/error ___________________________________________________________________ Modified: svn:mergeinfo ## -1,7 +1,7 ## /branches/BIGDATA_MGC_HA1_HA5/bigdata-rdf/src/java/com/bigdata/rdf/error:8025-8122 /branches/BIGDATA_OPENRDF_2_6_9_UPDATE/bigdata-rdf/src/java/com/bigdata/rdf/error:6769-6785 /branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/java/com/bigdata/rdf/error:6766-7380 -/branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/java/com/bigdata/rdf/error:7665-8131 +/branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/java/com/bigdata/rdf/error:7665-8131,8137-8142 /branches/INT64_BRANCH/bigdata-rdf/src/java/com/bigdata/rdf/error:4486-4522 /branches/MGC_1_3_0/bigdata-rdf/src/java/com/bigdata/rdf/error:7609-7752 /branches/QUADS_QUERY_BRANCH/bigdata-rdf/src/java/com/bigdata/rdf/error:4525-4531,4533-4548,4550-4584,4586-4609,4611-4632,4634-4643,4646-4672,4674-4685,4687-4693,4697-4735,4737-4782,4784-4792,4794-4796,4798-4801 \ No newline at end of property Index: branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/internal =================================================================== --- branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/internal 2014-04-30 18:52:56 UTC (rev 8158) +++ branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/internal 2014-04-30 19:13:09 UTC (rev 8159) Property changes on: branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/internal ___________________________________________________________________ Modified: svn:mergeinfo ## -1,7 +1,7 ## /branches/BIGDATA_MGC_HA1_HA5/bigdata-rdf/src/java/com/bigdata/rdf/internal:8025-8122 /branches/BIGDATA_OPENRDF_2_6_9_UPDATE/bigdata-rdf/src/java/com/bigdata/rdf/internal:6769-6785 /branches/BIGDATA_RELEASE_1_2_0/bigdata-rdf/src/java/com/bigdata/rdf/internal:6766-7380 -/branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/java/com/bigdata/rdf/internal:7665-8131 +/branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/java/com/bigdata/rdf/internal:7665-8131,8137-8142 /branches/INT64_BRANCH/bigdata-rdf/src/java/com/bigdata/rdf/internal:4486-4522 /branches/LARGE_LITERALS_REFACTOR/bigdata-rdf/src/java/com/bigdata/rdf/internal:4175-4387 /branches/MGC_1_3_0/bigdata-rdf/src/java/com/bigdata/rdf/internal:7609-7752 \ No newline at end of property Modified: branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/internal/constraints/RegexBOp.java =================================================================== --- branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/internal/constraints/RegexBOp.java 2014-04-30 18:52:56 UTC (rev 8158) +++ branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/internal/constraints/RegexBOp.java 2014-04-30 19:13:09 UTC (rev 8159) @@ -44,17 +44,17 @@ * SPARQL REGEX operator. */ public class RegexBOp extends XSDBooleanIVValueExpression - implements INeedsMaterialization { + implements INeedsMaterialization { /** - * - */ - private static final long serialVersionUID = 1357420268214930143L; - - private static final transient Logger log = Logger.getLogger(RegexBOp.class); + * + */ + private static final long serialVersionUID = 1357420268214930143L; + + private static final transient Logger log = Logger.getLogger(RegexBOp.class); public interface Annotations extends XSDBooleanIVValueExpression.Annotations { - + /** * The cached regex pattern. */ @@ -64,65 +64,65 @@ } private static Map<String,Object> anns( - final IValueExpression<? extends IV> pattern, - final IValueExpression<? extends IV> flags) { - - try { - - if (pattern instanceof IConstant && - (flags == null || flags instanceof IConstant)) { - - final IV parg = ((IConstant<IV>) pattern).get(); - - final IV farg = flags != null ? - ((IConstant<IV>) flags).get() : null; - - if (parg.hasValue() && (farg == null || farg.hasValue())) { - - final Value pargVal = parg.getValue(); - - final Value fargVal = farg != null ? farg.getValue() : null; - - return NV.asMap( - new NV(Annotations.PATTERN, - getPattern(pargVal, fargVal))); - - } - - } - - } catch (Exception ex) { - - if (log.isInfoEnabled()) { - log.info("could not create pattern for: " + pattern + ", " + flags); - } - - } - - return BOp.NOANNS; - + final IValueExpression<? extends IV> pattern, + final IValueExpression<? extends IV> flags) { + + try { + + if (pattern instanceof IConstant && + (flags == null || flags instanceof IConstant)) { + + final IV parg = ((IConstant<IV>) pattern).get(); + + final IV farg = flags != null ? + ((IConstant<IV>) flags).get() : null; + + if (parg.hasValue() && (farg == null || farg.hasValue())) { + + final Value pargVal = parg.getValue(); + + final Value fargVal = farg != null ? farg.getValue() : null; + + return NV.asMap( + new NV(Annotations.PATTERN, + getPattern(pargVal, fargVal))); + + } + + } + + } catch (Exception ex) { + + if (log.isInfoEnabled()) { + log.info("could not create pattern for: " + pattern + ", " + flags); + } + + } + + return BOp.NOANNS; + } - /** - * Construct a regex bop without flags. - */ + /** + * Construct a regex bop without flags. + */ @SuppressWarnings("rawtypes") - public RegexBOp( - final IValueExpression<? extends IV> var, - final IValueExpression<? extends IV> pattern) { + public RegexBOp( + final IValueExpression<? extends IV> var, + final IValueExpression<? extends IV> pattern) { this(new BOp[] { var, pattern }, anns(pattern, null)); } - /** - * Construct a regex bop with flags. - */ - @SuppressWarnings("rawtypes") + /** + * Construct a regex bop with flags. + */ + @SuppressWarnings("rawtypes") public RegexBOp( - final IValueExpression<? extends IV> var, - final IValueExpression<? extends IV> pattern, - final IValueExpression<? extends IV> flags) { + final IValueExpression<? extends IV> var, + final IValueExpression<? extends IV> pattern, + final IValueExpression<? extends IV> flags) { this(new BOp[] { var, pattern, flags }, anns(pattern, flags)); @@ -133,8 +133,8 @@ */ public RegexBOp(final BOp[] args, final Map<String, Object> anns) { - super(args, anns); - + super(args, anns); + if (args.length < 2 || args[0] == null || args[1] == null) throw new IllegalArgumentException(); @@ -146,33 +146,34 @@ public RegexBOp(final RegexBOp op) { super(op); } - + + @Override public Requirement getRequirement() { - - return INeedsMaterialization.Requirement.SOMETIMES; - + + return INeedsMaterialization.Requirement.SOMETIMES; + } - + + @Override public boolean accept(final IBindingSet bs) { - - @SuppressWarnings("rawtypes") + final Value var = asValue(getAndCheckBound(0, bs)); - + @SuppressWarnings("rawtypes") final IV pattern = getAndCheckBound(1, bs); @SuppressWarnings("rawtypes") final IV flags = arity() > 2 ? get(2).get(bs) : null; - + if (log.isDebugEnabled()) { - log.debug("regex var: " + var); - log.debug("regex pattern: " + pattern); - log.debug("regex flags: " + flags); + log.debug("regex var: " + var); + log.debug("regex pattern: " + pattern); + log.debug("regex flags: " + flags); } - - return accept(var, pattern.getValue(), - flags != null ? flags.getValue() : null); + return accept(var, pattern.getValue(), flags != null ? flags.getValue() + : null); + } /** @@ -185,67 +186,87 @@ * REGEXBOp should cache the Pattern when it is a constant </a> */ private boolean accept(final Value arg, final Value parg, final Value farg) { - + if (log.isDebugEnabled()) { - log.debug("regex var: " + arg); - log.debug("regex pattern: " + parg); - log.debug("regex flags: " + farg); + log.debug("regex var: " + arg); + log.debug("regex pattern: " + parg); + log.debug("regex flags: " + farg); } - + if (QueryEvaluationUtil.isSimpleLiteral(arg)) { - + final String text = ((Literal) arg).getLabel(); - + try { - - // first check for cached pattern - Pattern pattern = (Pattern) getProperty(Annotations.PATTERN); - if (pattern == null) { - pattern = getPattern(parg, farg); - } + + // first check for cached pattern + Pattern pattern = (Pattern) getProperty(Annotations.PATTERN); + + if (pattern == null) { + + // resolve the pattern. NB: NOT cached. + pattern = getPattern(parg, farg); + + } + + if (Thread.interrupted()) { + + /* + * Eagerly notice if the operator is interrupted. + * + * Note: Regex can be a high latency operation for a large + * RDF Literal. Therefore we want to check for an interrupt + * before each regex test. The Pattern code itself will not + * notice an interrupt.... + */ + throw new RuntimeException(new InterruptedException()); + + } + final boolean result = pattern.matcher(text).find(); + return result; - + } catch (IllegalArgumentException ex) { - - throw new SparqlTypeErrorException(); - + + throw new SparqlTypeErrorException(); + } - + } else { - - throw new SparqlTypeErrorException(); - + + throw new SparqlTypeErrorException(); + } - + } - private static Pattern getPattern(final Value parg, final Value farg) - throws IllegalArgumentException { - + private static Pattern getPattern(final Value parg, final Value farg) + throws IllegalArgumentException { + if (log.isDebugEnabled()) { - log.debug("regex pattern: " + parg); - log.debug("regex flags: " + farg); + log.debug("regex pattern: " + parg); + log.debug("regex flags: " + farg); } if (QueryEvaluationUtil.isSimpleLiteral(parg) && (farg == null || QueryEvaluationUtil.isSimpleLiteral(farg))) { final String ptn = ((Literal) parg).getLabel(); - String flags = ""; - if (farg != null) { - flags = ((Literal)farg).getLabel(); - } - int f = 0; - for (char c : flags.toCharArray()) { - switch (c) { - case 's': - f |= Pattern.DOTALL; - break; - case 'm': - f |= Pattern.MULTILINE; - break; - case 'i': { + String flags = ""; + if (farg != null) { + flags = ((Literal)farg).getLabel(); + } + int f = 0; + for (char c : flags.toCharArray()) { + switch (c) { + case 's': + f |= Pattern.DOTALL; + break; + case 'm': + f |= Pattern.MULTILINE; + break; + case 'i': { /* ... [truncated message content] |