blob: 783867a8a4c9248c9aa25c6cb1be5a31147b5ad7 [file] [log] [blame]
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta http-equiv="CACHE-CONTROL" content="NO-CACHE">
<meta charset="UTF-8">
<title>Project Build</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="generator" content="Jekyll v2.4.0">
<link rel="stylesheet" href="/css/font-awesome.min.css">
<link rel="stylesheet" href="/css/screen.css">
<link rel="icon" type="image/x-icon" href="/favicon.ico">
<script src="/js/jquery-3.2.1.min.js"></script>
<!--[if lt IE 9]>
<script src="/js/html5shiv.min.js"></script>
<script src="/js/respond.min.js"></script>
<![endif]-->
<script src="/js/screen.js"></script>
<script type="text/javascript" src="/assets/javascripts/bundle.js" charset="utf-8"></script>
</head>
<body>
<header role="banner">
<nav class="mobile-nav show-on-mobiles">
<ul>
<li class="">
<a href="/">Home</a>
</li>
<li class="current">
<a href="/docs/">Doc<span class="show-on-mobiles">s</span><span class="hide-on-mobiles">umentation</span></a>
</li>
</li>
<li class="">
<a href="/downloads/">Downloads</a>
</li>
<li class="">
<a href="/talks/">Talks</a>
</li>
<li class="">
<a href="/news/">News</a>
</li>
<li class="">
<a href="/develop/">Develop</a>
</li>
<li class="">
<a href="/help/">Help</a>
</li>
</ul>
</nav>
<div class="grid">
<div class="unit one-third center-on-mobiles">
<h1>
<a href="/">
<span class="sr-only">Apache Mnemonic</span>
<img src="/img/mnemonic_logo_v2.png" width="289" alt="Mnemonic Logo" class="logo">
</a>
<a href="https://www.apache.org/events/current-event.html">
<img src="https://www.apache.org/events/current-event-234x60.png"/>
</a>
</h1>
</div>
<nav class="main-nav unit two-thirds hide-on-mobiles">
<ul>
<li class="">
<a href="/">Home</a>
</li>
<li class="current">
<a href="/docs/">Doc<span class="show-on-mobiles">s</span><span class="hide-on-mobiles">umentation</span></a>
</li>
</li>
<li class="">
<a href="/downloads/">Downloads</a>
</li>
<li class="">
<a href="/talks/">Talks</a>
</li>
<li class="">
<a href="/news/">News</a>
</li>
<li class="">
<a href="/develop/">Develop</a>
</li>
<li class="">
<a href="/help/">Help</a>
</li>
</ul>
</nav>
</div>
<!-- Return to Top -->
<a href="#top" id="return-to-top"><i class="fa fa-chevron-up"></i></a>
</header>
<section class="docs">
<div class="grid">
<div class="docs-nav-mobile unit whole show-on-mobiles">
<select onchange="if (this.value) window.location.href=this.value">
<option value="">Navigate the docs…</option>
<optgroup label="Overview">
<option value="/docs/arch.html">Architecture</option>
<option value="/docs/features.html">Features</option>
<option value="/docs/modes.html">Mnemonic Modes</option>
<option value="/docs/memsrvcmp.html">Durable Memory Service Comparison</option>
<option value="/docs/integration.html">Integration with other projects</option>
<option value="/docs/domusecases.html">DOM Use Cases</option>
<option value="/docs/dcmusecases.html">DCM Use Cases</option>
<option value="/docs/msusecases.html">MS Use Cases</option>
<option value="/docs/sparkusecases.html">Apache Spark Integration Use Cases</option>
<option value="/docs/hadoopusecases.html">Apache Hadoop Integration Use Cases</option>
<option value="/docs/gcdata.html">Java GC data</option>
<option value="/docs/security.html">Security</option>
</optgroup>
<optgroup label="Usage">
<option value="/docs/getstarted.html">Get Started</option>
<option value="/docs/devsetup.html">Development Setup</option>
<option value="/docs/submitchanges.html">Submit Changes</option>
<option value="/docs/build.html">Project Build</option>
<option value="/docs/runtest.html">Run tests</option>
<option value="/docs/docker.html">Docker usage</option>
</optgroup>
</select>
</div>
<div class="unit four-fifths">
<article>
<h1>Project Build</h1>
<h3 id="how-to-build-it">How to build it?</h3>
<p>Please see the file LICENSE for information on how this library is licensed. Below you will find descriptions for each module.</p>
<ul>
<li><strong>mnemonic-core</strong> – the submodule project for core</li>
<li><strong>mnemonic-collections</strong> – the submodule project for generic collections</li>
<li><strong>mnemonic-examples</strong> – the submodule project for examples, Please refer to the testcases of respective module as complete examples.</li>
<li><strong>mnemonic-memory-services/mnemonic-pmalloc-service</strong> – the submodule project for pmalloc memory service</li>
<li><strong>mnemonic-memory-services/mnemonic-nvml-vmem-service</strong> – the submodule project for vmem memory service</li>
<li><strong>mnemonic-memory-services/mnemonic-nvml-pmem-service</strong> – the submodule project for pmem memory service</li>
<li><strong>mnemonic-memory-services/mnemonic-sys-vmem-service</strong> – the submodule project for system vmem memory service</li>
<li><strong>mnemonic-memory-services/service-dist</strong> – the location of extensive memory services (auto-generated)</li>
<li><strong>mnemonic-computing-services/mnemonic-utilities-service</strong> – the submodule project for utilities computing service</li>
<li><strong>mnemonic-computing-services/service-dist</strong> – the location of extensive computing services (auto-generated)</li>
<li><strong>mnemonic-hadoop/mnemonic-hadoop-mapreduce</strong> – the submodule project for Apache Hadoop mapreduce computing</li>
<li><strong>mnemonic-spark/mnemonic-spark-core</strong> – the submodule project for Apache Spark durable computing</li>
</ul>
<p>To build this library without Docker image, you will need to install some required packages on the build system. Otherwise, you can build the project with Docker image generated <a href="devsetup.html" target="_blank">previously.</a></p>
<ul>
<li><strong>Maven</strong> – the building tool v3.2.1 or above. <i>Optional if you choose to use Gradle.</i></li>
<li><strong>Gradle</strong> – the building tool v6.7.1 or above. <i>Optional if you choose to use Maven.</i></li>
<li><strong>NVML</strong> – the <a href="http://pmem.io" target="_blank">NVM library.</a> Please compile this library that was revised with 630862e82f.</li>
<li><strong>JDK</strong> – the Java Develop Kit 7-8. Please properly configure JAVA_HOME in environment variables.</li>
<li><strong>PMFS</strong> – the PMFS should be properly installed and configured on Linux system if you want to simulate read latency. <i>Optional if you choose to use it for simulation purpose.</i></li>
<li><strong>PMalloc</strong> – a supported durable memory native library <a href="https://github.com/NonVolatileComputing/pmalloc.git" target="_blank">here.</a></li>
</ul>
<hr />
<p>You can use following commmand lines to install build tools for this project.</p>
<p><code>bash
# ---- install build tools ----
$ sudo apt-get -y update &amp;&amp; \
apt-get install -y default-jdk cmake check git pkg-config autoconf man build-essential gcc g++ uuid-dev pandoc devscripts flex doxygen maven
$ sudo apt-get install -y libndctl-dev libpmem-dev libvmem-dev libpmemobj-dev
$ sudo apt-get clean
# ---- update environment variables ----
$ export JAVA_HOME=/usr/lib/jvm/default-java
$ export PATH=$JAVA_HOME/bin:$PATH
$ source ~/.profile
# ---- install pmalloc ----
$ git clone https://github.com/NonVolatileComputing/pmalloc.git &amp;&amp; \
cd pmalloc &amp;&amp; mkdir build &amp;&amp; cd build &amp;&amp; cmake .. &amp;&amp; make &amp;&amp; make install
# ---- clone Mnemonic ----
$ git clone https://github.com/apache/mnemonic.git &amp;&amp; \
cd mnemonic &amp;&amp; mvn clean package install
</code></p>
<hr />
<p>Once the build system is setup, this Library is built using this command at the top level:</p>
<p><code>bash
$ git clean -xdf # if pull from a git repo.
# ------ For Maven ---------
$ mvn clean install
# ------ For Gradle --------
$ ./gradlew clean
$ ./gradlew build -x test
</code></p>
<p>To exclude a customized memory service for your platform e.g. OSX, note that if you excluded one or both memory services, some or all testcases/examples will fail since their dependent memory services are unavailable.</p>
<p><code>bash
$ git clean -xdf # if pull from a git repo.
$ mvn -pl '!mnemonic-memory-services/mnemonic-nvml-vmem-service' clean package install
</code></p>
<div class="section-nav">
<div class="left align-right">
<a href="/docs/submitchanges.html" class="prev">Back</a>
</div>
<div class="right align-left">
<a href="/docs/runtest.html" class="next">Next</a>
</div>
</div>
<div class="clear"></div>
</article>
</div>
<div class="unit one-fifth hide-on-mobiles">
<aside>
<h4>Overview</h4>
<ul>
<li class=""><a href="/docs/arch.html">Architecture</a></li>
<li class=""><a href="/docs/features.html">Features</a></li>
<li class=""><a href="/docs/modes.html">Mnemonic Modes</a></li>
<li class=""><a href="/docs/memsrvcmp.html">Durable Memory Service Comparison</a></li>
<li class=""><a href="/docs/integration.html">Integration with other projects</a></li>
<li class=""><a href="/docs/domusecases.html">DOM Use Cases</a></li>
<li class=""><a href="/docs/dcmusecases.html">DCM Use Cases</a></li>
<li class=""><a href="/docs/msusecases.html">MS Use Cases</a></li>
<li class=""><a href="/docs/sparkusecases.html">Apache Spark Integration Use Cases</a></li>
<li class=""><a href="/docs/hadoopusecases.html">Apache Hadoop Integration Use Cases</a></li>
<li class=""><a href="/docs/gcdata.html">Java GC data</a></li>
<li class=""><a href="/docs/security.html">Security</a></li>
</ul>
<h4>Usage</h4>
<ul>
<li class=""><a href="/docs/getstarted.html">Get Started</a></li>
<li class=""><a href="/docs/devsetup.html">Development Setup</a></li>
<li class=""><a href="/docs/submitchanges.html">Submit Changes</a></li>
<li class="current"><a href="/docs/build.html">Project Build</a></li>
<li class=""><a href="/docs/runtest.html">Run tests</a></li>
<li class=""><a href="/docs/docker.html">Docker usage</a></li>
</ul>
</aside>
</div>
<div class="clear"></div>
</div>
</section>
<footer role="contentinfo">
<p><div align="center">Apache Mnemonic, Mnemonic, Apache, and the Mnemonic logo are trademarks of The Apache Software Foundation.</div>
<div align="center"> Copyright &copy;&nbsp;2021 <a href="https://www.apache.org/">The Apache Software Foundation</a></div></p>
</footer>
<script>
var anchorForId = function (id) {
var anchor = document.createElement("a");
anchor.className = "header-link";
anchor.href = "#" + id;
anchor.innerHTML = "<span class=\"sr-only\">Permalink</span><i class=\"fa fa-link\"></i>";
anchor.title = "Permalink";
return anchor;
};
var linkifyAnchors = function (level, containingElement) {
var headers = containingElement.getElementsByTagName("h" + level);
for (var h = 0; h < headers.length; h++) {
var header = headers[h];
if (typeof header.id !== "undefined" && header.id !== "") {
header.appendChild(anchorForId(header.id));
}
}
};
document.onreadystatechange = function () {
if (this.readyState === "complete") {
var contentBlock = document.getElementsByClassName("docs")[0] || document.getElementsByClassName("news")[0];
if (!contentBlock) {
return;
}
for (var level = 1; level <= 6; level++) {
linkifyAnchors(level, contentBlock);
}
}
};
</script>
</body>
</html>