mirror of
https://github.com/alanorth/cgspace-notes.git
synced 2024-11-23 07:00:20 +01:00
432 lines
17 KiB
HTML
432 lines
17 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
|
|
<meta property="og:title" content="April, 2017" />
|
|
<meta property="og:description" content="2017-04-02
|
|
|
|
|
|
Merge one change to CCAFS flagships that I had forgotten to remove last month (“MANAGING CLIMATE RISK”): https://github.com/ilri/DSpace/pull/317
|
|
Quick proof-of-concept hack to add dc.rights to the input form, including some inline instructions/hints:
|
|
|
|
|
|
|
|
|
|
|
|
Remove redundant/duplicate text in the DSpace submission license
|
|
Testing the CMYK patch on a collection with 650 items:
|
|
|
|
|
|
$ [dspace]/bin/dspace filter-media -f -i 10568/16498 -p "ImageMagick PDF Thumbnail" -v >& /tmp/filter-media-cmyk.txt
|
|
|
|
|
|
" />
|
|
<meta property="og:type" content="article" />
|
|
<meta property="og:url" content="https://alanorth.github.io/cgspace-notes/2017-04/" />
|
|
|
|
|
|
|
|
<meta property="article:published_time" content="2017-04-02T17:08:52+02:00"/>
|
|
<meta property="article:modified_time" content="2017-04-12T14:39:42+03:00"/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<meta name="twitter:card" content="summary"/>
|
|
|
|
|
|
|
|
<meta name="twitter:text:title" content="April, 2017"/>
|
|
<meta name="twitter:title" content="April, 2017"/>
|
|
<meta name="twitter:description" content="2017-04-02
|
|
|
|
|
|
Merge one change to CCAFS flagships that I had forgotten to remove last month (“MANAGING CLIMATE RISK”): https://github.com/ilri/DSpace/pull/317
|
|
Quick proof-of-concept hack to add dc.rights to the input form, including some inline instructions/hints:
|
|
|
|
|
|
|
|
|
|
|
|
Remove redundant/duplicate text in the DSpace submission license
|
|
Testing the CMYK patch on a collection with 650 items:
|
|
|
|
|
|
$ [dspace]/bin/dspace filter-media -f -i 10568/16498 -p "ImageMagick PDF Thumbnail" -v >& /tmp/filter-media-cmyk.txt
|
|
|
|
|
|
"/>
|
|
|
|
<meta name="generator" content="Hugo 0.20" />
|
|
|
|
|
|
|
|
<script type="application/ld+json">
|
|
{
|
|
"@context": "http://schema.org",
|
|
"@type": "BlogPosting",
|
|
"headline": "April, 2017",
|
|
"url": "https://alanorth.github.io/cgspace-notes/2017-04/",
|
|
"wordCount": "1208",
|
|
"datePublished": "2017-04-02T17:08:52+02:00",
|
|
"dateModified": "2017-04-12T14:39:42+03:00",
|
|
"author": {
|
|
"@type": "Person",
|
|
"name": "Alan Orth"
|
|
},
|
|
"keywords": "Notes"
|
|
}
|
|
</script>
|
|
|
|
|
|
|
|
<link rel="canonical" href="https://alanorth.github.io/cgspace-notes/2017-04/">
|
|
|
|
<title>April, 2017 | CGSpace Notes</title>
|
|
|
|
<!-- combined, minified CSS -->
|
|
<link href="https://alanorth.github.io/cgspace-notes/css/style.css" rel="stylesheet" integrity="sha384-CBHEXFKdMsTRFhEu0HSP9oETZoVpnz1mozAPqhfpxMQkda7lNJlqsQdYB30287Ka" crossorigin="anonymous">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div class="blog-masthead">
|
|
<div class="container">
|
|
<nav class="nav blog-nav">
|
|
<a class="nav-link " href="https://alanorth.github.io/cgspace-notes/">Home</a>
|
|
|
|
|
|
</nav>
|
|
</div>
|
|
</div>
|
|
|
|
<header class="blog-header">
|
|
<div class="container">
|
|
<h1 class="blog-title"><a href="https://alanorth.github.io/cgspace-notes/" rel="home">CGSpace Notes</a></h1>
|
|
<p class="lead blog-description">Documenting day-to-day work on the <a href="https://cgspace.cgiar.org">CGSpace</a> repository.</p>
|
|
</div>
|
|
</header>
|
|
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col-sm-8 blog-main">
|
|
|
|
|
|
|
|
|
|
<article class="blog-post">
|
|
<header>
|
|
<h2 class="blog-post-title"><a href="https://alanorth.github.io/cgspace-notes/2017-04/">April, 2017</a></h2>
|
|
<p class="blog-post-meta"><time datetime="2017-04-02T17:08:52+02:00">Sun Apr 02, 2017</time> by Alan Orth in
|
|
|
|
<i class="fa fa-tag" aria-hidden="true"></i> <a href="/cgspace-notes/tags/notes" rel="tag">Notes</a>
|
|
|
|
</p>
|
|
</header>
|
|
<h2 id="2017-04-02">2017-04-02</h2>
|
|
|
|
<ul>
|
|
<li>Merge one change to CCAFS flagships that I had forgotten to remove last month (“MANAGING CLIMATE RISK”): <a href="https://github.com/ilri/DSpace/pull/317">https://github.com/ilri/DSpace/pull/317</a></li>
|
|
<li>Quick proof-of-concept hack to add <code>dc.rights</code> to the input form, including some inline instructions/hints:</li>
|
|
</ul>
|
|
|
|
<p><img src="/cgspace-notes/2017/04/dc-rights.png" alt="dc.rights in the submission form" /></p>
|
|
|
|
<ul>
|
|
<li>Remove redundant/duplicate text in the DSpace submission license</li>
|
|
<li>Testing the CMYK patch on a collection with 650 items:</li>
|
|
</ul>
|
|
|
|
<pre><code>$ [dspace]/bin/dspace filter-media -f -i 10568/16498 -p "ImageMagick PDF Thumbnail" -v >& /tmp/filter-media-cmyk.txt
|
|
</code></pre>
|
|
|
|
<p></p>
|
|
|
|
<h2 id="2017-04-03">2017-04-03</h2>
|
|
|
|
<ul>
|
|
<li>Continue testing the CMYK patch on more communities:</li>
|
|
</ul>
|
|
|
|
<pre><code>$ [dspace]/bin/dspace filter-media -f -i 10568/1 -p "ImageMagick PDF Thumbnail" -v >> /tmp/filter-media-cmyk.txt 2>&1
|
|
</code></pre>
|
|
|
|
<ul>
|
|
<li>So far there are almost 500:</li>
|
|
</ul>
|
|
|
|
<pre><code>$ grep -c profile /tmp/filter-media-cmyk.txt
|
|
484
|
|
</code></pre>
|
|
|
|
<ul>
|
|
<li>Looking at the CG Core document again, I’ll send some feedback to Peter and Abenet:
|
|
|
|
<ul>
|
|
<li>We use cg.contributor.crp to indicate the CRP(s) affiliated with the item</li>
|
|
<li>DSpace has dc.date.available, but this field isn’t particularly meaningful other than as an automatic timestamp at the time of item accession (and is identical to dc.date.accessioned)</li>
|
|
<li>dc.relation exists in CGSpace, but isn’t used—rather dc.relation.ispartofseries, which is used ~5,000 times to Series name and number within that series</li>
|
|
</ul></li>
|
|
<li>Also, I’m noticing some weird outliers in <code>cg.coverage.region</code>, need to remember to go correct these later:</li>
|
|
</ul>
|
|
|
|
<pre><code>dspace=# select text_value from metadatavalue where resource_type_id=2 and metadata_field_id=227;
|
|
</code></pre>
|
|
|
|
<h2 id="2017-04-04">2017-04-04</h2>
|
|
|
|
<ul>
|
|
<li>The <code>filter-media</code> script has been running on more large communities and now there are many more CMYK PDFs that have been fixed:</li>
|
|
</ul>
|
|
|
|
<pre><code>$ grep -c profile /tmp/filter-media-cmyk.txt
|
|
1584
|
|
</code></pre>
|
|
|
|
<ul>
|
|
<li>Trying to find a way to get the number of items submitted by a certain user in 2016</li>
|
|
<li>It’s not possible in the DSpace search / module interfaces, but might be able to be derived from <code>dc.description.provenance</code>, as that field contains the name and email of the submitter/approver, ie:</li>
|
|
</ul>
|
|
|
|
<pre><code>Submitted by Francesca Giampieri (fgiampieri) on 2016-01-19T13:56:43Z^M
|
|
No. of bitstreams: 1^M
|
|
ILAC_Brief21_PMCA.pdf: 113462 bytes, checksum: 249fef468f401c066a119f5db687add0 (MD5)
|
|
</code></pre>
|
|
|
|
<ul>
|
|
<li>This SQL query returns fields that were submitted or approved by giampieri in 2016 and contain a “checksum” (ie, there was a bitstream in the submission):</li>
|
|
</ul>
|
|
|
|
<pre><code>dspace=# select * from metadatavalue where resource_type_id=2 and metadata_field_id=28 and text_value ~ '^(Submitted|Approved).*giampieri.*2016-.*checksum.*';
|
|
</code></pre>
|
|
|
|
<ul>
|
|
<li>Then this one does the same, but for fields that don’t contain checksums (ie, there was no bitstream in the submission):</li>
|
|
</ul>
|
|
|
|
<pre><code>dspace=# select * from metadatavalue where resource_type_id=2 and metadata_field_id=28 and text_value ~ '^(Submitted|Approved).*giampieri.*2016-.*' and text_value !~ '^(Submitted|Approved).*giampieri.*2016-.*checksum.*';
|
|
</code></pre>
|
|
|
|
<ul>
|
|
<li>For some reason there seem to be way too many fields, for example there are 498 + 13 here, which is 511 items for just this one user.</li>
|
|
<li>It looks like there can be a scenario where the user submitted AND approved it, so some records might be doubled…</li>
|
|
<li>In that case it might just be better to see how many the user submitted (both <em>with</em> and <em>without</em> bitstreams):</li>
|
|
</ul>
|
|
|
|
<pre><code>dspace=# select * from metadatavalue where resource_type_id=2 and metadata_field_id=28 and text_value ~ '^Submitted.*giampieri.*2016-.*';
|
|
</code></pre>
|
|
|
|
<h2 id="2017-04-05">2017-04-05</h2>
|
|
|
|
<ul>
|
|
<li>After doing a few more large communities it seems this is the final count of CMYK PDFs:</li>
|
|
</ul>
|
|
|
|
<pre><code>$ grep -c profile /tmp/filter-media-cmyk.txt
|
|
2505
|
|
</code></pre>
|
|
|
|
<h2 id="2017-04-06">2017-04-06</h2>
|
|
|
|
<ul>
|
|
<li>After reading the <a href="https://wiki.duraspace.org/display/cmtygp/DCAT+Meeting+April+2017">notes for DCAT April 2017</a> I am testing some new settings for PostgreSQL on DSpace Test:
|
|
|
|
<ul>
|
|
<li><code>db.maxconnections</code> 30→70 (the default PostgreSQL config allows 100 connections, so DSpace’s default of 30 is quite low)</li>
|
|
<li><code>db.maxwait</code> 5000→10000</li>
|
|
<li><code>db.maxidle</code> 8→20 (DSpace default is -1, unlimited, but we had set it to 8 earlier)</li>
|
|
</ul></li>
|
|
<li>I need to look at the Munin graphs after a few days to see if the load has changed</li>
|
|
<li>Run system updates on DSpace Test and reboot the server</li>
|
|
<li>Discussing harvesting CIFOR’s DSpace via OAI</li>
|
|
<li>Sisay added their OAI as a source to a new collection, but using the Simple Dublin Core method, so many fields are unqualified and duplicated</li>
|
|
<li>Looking at the <a href="https://wiki.duraspace.org/display/DSDOC5x/XMLUI+Configuration+and+Customization">documentation</a> it seems that we probably want to be using DSpace Intermediate Metadata</li>
|
|
</ul>
|
|
|
|
<h2 id="2017-04-10">2017-04-10</h2>
|
|
|
|
<ul>
|
|
<li>Adjust Linode CPU usage alerts on DSpace servers
|
|
|
|
<ul>
|
|
<li>CGSpace from 200 to 250%</li>
|
|
<li>DSpace Test from 100 to 150%</li>
|
|
</ul></li>
|
|
<li>Remove James from Linode access</li>
|
|
<li>Look into having CIFOR use a sub prefix of 10568 like 10568.01</li>
|
|
<li>Handle.net calls this <a href="https://www.handle.net/faq.html#4">“derived prefixes”</a> and it seems this would work with DSpace if we wanted to go that route</li>
|
|
<li>CIFOR is starting to test aligning their metadata more with CGSpace/CG core</li>
|
|
<li>They shared a <a href="https://data.cifor.org/dspace/xmlui/handle/11463/947?show=full">test item</a> which is using <code>cg.coverage.country</code>, <code>cg.subject.cifor</code>, <code>dc.subject</code>, and <code>dc.date.issued</code></li>
|
|
<li>Looking at their OAI I’m not sure it has updated as I don’t see the new fields: <a href="https://data.cifor.org/dspace/oai/request?verb=ListRecords&resumptionToken=oai_dc///col_11463_6/900">https://data.cifor.org/dspace/oai/request?verb=ListRecords&resumptionToken=oai_dc///col_11463_6/900</a></li>
|
|
<li>Maybe they need to make sure they are running the OAI cache refresh cron job, or maybe OAI doesn’t export these?</li>
|
|
<li>I added <code>cg.subject.cifor</code> to the metadata registry and I’m waiting for the harvester to re-harvest to see if it picks up more data now</li>
|
|
<li>Another possiblity is that we could use a cross walk… but I’ve never done it.</li>
|
|
</ul>
|
|
|
|
<h2 id="2017-04-11">2017-04-11</h2>
|
|
|
|
<ul>
|
|
<li>Looking at the item from CIFOR it hasn’t been updated yet, maybe they aren’t running the cron job</li>
|
|
<li>I emailed Usman from CIFOR to ask if he’s running the cron job</li>
|
|
</ul>
|
|
|
|
<h2 id="2017-04-12">2017-04-12</h2>
|
|
|
|
<ul>
|
|
<li>CIFOR says they have cleaned their OAI cache and that the cron job for OAI import is enabled</li>
|
|
<li>Now I see updated fields, like <code>dc.date.issued</code> but none from the CG or CIFOR namespaces</li>
|
|
<li>Also, DSpace Test hasn’t re-harvested this item yet, so I will wait one more day before forcing a re-harvest</li>
|
|
<li>Looking at CIFOR’s OAI using different metadata formats, like qualified Dublin Core and DSpace Intermediate Metadata:
|
|
|
|
<ul>
|
|
<li>QDC: <a href="https://data.cifor.org/dspace/oai/request?verb=ListRecords&resumptionToken=qdc///col_11463_6/900">https://data.cifor.org/dspace/oai/request?verb=ListRecords&resumptionToken=qdc///col_11463_6/900</a></li>
|
|
<li>DIM: <a href="https://data.cifor.org/dspace/oai/request?verb=ListRecords&resumptionToken=dim///col_11463_6/900">https://data.cifor.org/dspace/oai/request?verb=ListRecords&resumptionToken=dim///col_11463_6/900</a></li>
|
|
</ul></li>
|
|
<li>Looking at one of CGSpace’s items in OAI it doesn’t seem that metadata fields other than those in the DC schema are exported:
|
|
|
|
<ul>
|
|
<li><a href="https://cgspace.cgiar.org/handle/10568/33346?show=full">https://cgspace.cgiar.org/handle/10568/33346?show=full</a></li>
|
|
<li><a href="https://cgspace.cgiar.org/oai/request?verb=ListRecords&metadataPrefix=dim&set=col_10568_68619">https://cgspace.cgiar.org/oai/request?verb=ListRecords&metadataPrefix=dim&set=col_10568_68619</a></li>
|
|
</ul></li>
|
|
<li>Side note: WTF, I just saw an item on CGSpace’s OAI that is using <code>dc.cplace.country</code> and <code>dc.rplace.region</code>, which we stopped using in 2016 after the metadata migrations:</li>
|
|
</ul>
|
|
|
|
<p><img src="/cgspace-notes/2017/04/cplace.png" alt="stale metadata in OAI" /></p>
|
|
|
|
<ul>
|
|
<li>The particular item is <a href="http://hdl.handle.net/10568/6"><sup>10568</sup>⁄<sub>6</sub></a> and, for what it’s worth, the stale metadata only appears in the OAI view:
|
|
|
|
<ul>
|
|
<li>XMLUI: <a href="https://cgspace.cgiar.org/handle/10568/6?show=full">https://cgspace.cgiar.org/handle/10568/6?show=full</a></li>
|
|
<li>OAI: <a href="https://cgspace.cgiar.org/oai/request?verb=GetRecord&metadataPrefix=dim&identifier=oai:cgspace.cgiar.org:10568/6">https://cgspace.cgiar.org/oai/request?verb=GetRecord&metadataPrefix=dim&identifier=oai:cgspace.cgiar.org:10568/6</a></li>
|
|
</ul></li>
|
|
<li>I don’t see these fields anywhere in our source code or the database’s metadata registry, so maybe it’s just a cache issue</li>
|
|
<li>I will have to check the OAI cron scripts on DSpace Test, and then run them on CGSpace</li>
|
|
<li>Running <code>dspace oai import</code> and <code>dspace oai clean-cache</code> have zero effect, but this seems to rebuild the cache from scratch:</li>
|
|
</ul>
|
|
|
|
<pre><code>$ /home/dspacetest.cgiar.org/bin/dspace oai import -c
|
|
...
|
|
63900 items imported so far...
|
|
64000 items imported so far...
|
|
Total: 64056 items
|
|
Purging cached OAI responses.
|
|
OAI 2.0 manager action ended. It took 829 seconds.
|
|
</code></pre>
|
|
|
|
<ul>
|
|
<li>After reading some threads on the DSpace mailing list, I see that <code>clean-cache</code> is actually only for caching <em>responses</em>, ie to client requests in the OAI web application</li>
|
|
<li>These are stored in <code>[dspace]/var/oai/requests/</code></li>
|
|
<li>The import command should theoretically catch situations like this where an item’s metadata was updated, but in this case we changed the metadata schema and it doesn’t seem to catch it (could be a bug!)</li>
|
|
<li>Attempting a full rebuild of OAI on CGSpace:</li>
|
|
</ul>
|
|
|
|
<pre><code>$ export JAVA_OPTS="-Dfile.encoding=UTF-8 -Xmx1024m"
|
|
$ time schedtool -D -e ionice -c2 -n7 nice -n19 /home/cgspace.cgiar.org/bin/dspace oai import -c
|
|
...
|
|
58700 items imported so far...
|
|
Total: 58789 items
|
|
Purging cached OAI responses.
|
|
OAI 2.0 manager action ended. It took 1032 seconds.
|
|
|
|
real 17m20.156s
|
|
user 4m35.293s
|
|
sys 1m29.310s
|
|
</code></pre>
|
|
|
|
<ul>
|
|
<li>Now the data for <sup>10568</sup>⁄<sub>6</sub> is correct in OAI: <a href="https://cgspace.cgiar.org/oai/request?verb=GetRecord&metadataPrefix=dim&identifier=oai:cgspace.cgiar.org:10568/6">https://cgspace.cgiar.org/oai/request?verb=GetRecord&metadataPrefix=dim&identifier=oai:cgspace.cgiar.org:10568/6</a></li>
|
|
<li>Perhaps I need to file a bug for this, or at least ask on the DSpace Test mailing list?</li>
|
|
<li>I wonder if we could use a crosswalk to convert to a format that CG Core wants, like <code><date Type="Available"></code></li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</article>
|
|
|
|
|
|
|
|
</div> <!-- /.blog-main -->
|
|
|
|
<aside class="col-sm-3 offset-sm-1 blog-sidebar">
|
|
|
|
|
|
|
|
<section class="sidebar-module">
|
|
<h4>Recent Posts</h4>
|
|
<ol class="list-unstyled">
|
|
|
|
|
|
<li><a href="/cgspace-notes/2017-04/">April, 2017</a></li>
|
|
|
|
<li><a href="/cgspace-notes/2017-03/">March, 2017</a></li>
|
|
|
|
<li><a href="/cgspace-notes/2017-02/">February, 2017</a></li>
|
|
|
|
<li><a href="/cgspace-notes/2017-01/">January, 2017</a></li>
|
|
|
|
<li><a href="/cgspace-notes/2016-12/">December, 2016</a></li>
|
|
|
|
</ol>
|
|
</section>
|
|
|
|
|
|
|
|
|
|
<section class="sidebar-module">
|
|
<h4>Links</h4>
|
|
<ol class="list-unstyled">
|
|
|
|
<li><a href="https://cgspace.cgiar.org">CGSpace</a></li>
|
|
|
|
<li><a href="https://dspacetest.cgiar.org">DSpace Test</a></li>
|
|
|
|
<li><a href="https://github.com/ilri/DSpace">CGSpace @ GitHub</a></li>
|
|
|
|
</ol>
|
|
</section>
|
|
|
|
</aside>
|
|
|
|
|
|
</div> <!-- /.row -->
|
|
</div> <!-- /.container -->
|
|
|
|
<footer class="blog-footer">
|
|
<p>
|
|
|
|
Blog template created by <a href="https://twitter.com/mdo">@mdo</a>, ported to Hugo by <a href='https://twitter.com/mralanorth'>@mralanorth</a>.
|
|
|
|
</p>
|
|
<p>
|
|
<a href="#">Back to top</a>
|
|
</p>
|
|
</footer>
|
|
|
|
</body>
|
|
|
|
</html>
|