Skip to content
This repository has been archived by the owner on Nov 18, 2020. It is now read-only.

Migrating Binary Files

Adam Wead edited this page Aug 27, 2018 · 14 revisions

Migrating Binary Files

Setup

  • Bypass Fedora authentication by changing the authentication provider in /etc/fcrepo/repository.json

change:

{ "classname" : "org.fcrepo.auth.common.ServletContainerAuthenticationProvider" }

to:

{ "classname" : "org.fcrepo.auth.common.BypassSecurityServletAuthenticationProvider" }
  • Turn off Tomcat authentication by commenting out the security constraint in /var/lib/tomcat/webapps/SStestFedora/WEB-INF/web.xml

      <!-- Uncomment section below to enable Basic-Authentication -->
      <!--
      <security-constraint>
              <web-resource-collection>
                      <web-resource-name>Fedora4</web-resource-name>
                      <url-pattern>/*</url-pattern>
                      <http-method>DELETE</http-method>
                      <http-method>PUT</http-method>
                      <http-method>HEAD</http-method>
                      <http-method>OPTIONS</http-method>
                      <http-method>PATCH</http-method>
                      <http-method>GET</http-method>
                      <http-method>POST</http-method>
              </web-resource-collection>
              <auth-constraint>
                      <role-name>fedoraUser</role-name>
                      <role-name>fedoraAdmin</role-name>
              </auth-constraint>
              <user-data-constraint>
                      <transport-guarantee>NONE</transport-guarantee>
              </user-data-constraint>
      </security-constraint>
    
      <login-config>
              <auth-method>BASIC</auth-method>
              <realm-name>fcrepo</realm-name>
      </login-config> -->
    
  • Alter Database Collation (needs to be done before loading database)

    ALTER DATABASE ssfedoratest CHARACTER SET utf8 COLLATE utf8_bin;
    
  • Make sure collation is correct

    SELECT DISTINCT C.collation_name, T.table_name
    FROM information_schema.tables AS T,
    information_schema.`collation_character_set_applicability` AS C
    WHERE C.collation_name = T.table_collation
    AND T.table_schema = DATABASE();
    
    SELECT default_collation_name
    FROM information_schema.schemata S
    WHERE schema_name = (SELECT DATABASE()
    FROM DUAL);
    

Benchmarks

Results are taken from time commands during the rspec execution and represent the elapsed time in seconds for the test to complete.

Solr Queries

Before Migration (baseline) Aug. 27
240.02 s 118.89 s

Local Uploads

Before Migration (baseline) Aug. 27
26.36 s 29.19 s

Local Uploads with Resque

Before Migration (baseline) Aug. 27
151.09 s 110.69 s
Clone this wiki locally