Showing posts with label Hadoop. Show all posts
Showing posts with label Hadoop. Show all posts

Tuesday, November 8, 2016

FreeEed eDiscovery, AI, Machine Learning, and Social Media

In the V7.0.0 release of FreeEed, we are highlighting text analytics and social media. 


You might also find interesting the articles that Mark Kerzner, the author of FreeEed, wrote recently on Bloomberg Law.

The source code

Our open source code collection is growing, and we have combined it all in one place: the SHMsoft company page on GitHub.

With gratitude and acknowledgment: this work is funded in part by the DARPA/Memex program, here is a Forbes article about our team.

Next: FreeEed as a service in the Amazon AWS cloud.

Cheers, 

FreeEed - eDiscovery easy as popcorn.   

Friday, November 4, 2016

Using FreeEed for social media discovery

One of the areas that the Memex/DARPA teams excel in is crawling. FreeEed and the people behind it are part of the Memex, so it was quite natural to integrate discovery of crawl results into FreeEed processing and review.

Here is a recent Forbes article about the team.

Searching the websites and social media has been added to FreeEed starting from version 7. The common format to store crawl results is JSON. Each JSON description corresponds to a website page, user post, or a similar item.

Each JSON search entry is represented by a one-line in the archive file. The archive is given the extension *.jl, which stands for "JSON line".

FreeEed understands the *.jl extension, parses the JSON content of every line in the *.jl file, and finds indexes such fields as text, authors, etc., and makes them searchable in the FreeEed Review tool.

Below is a screenshot of FreeEeedUI review, illustrating searches in  a collection from an escort services website.

















How to create your crawler? You can use the crawler from Scraping Hub, also a member of the Memex team. Or you can use the trusted friend, Apache Nutch. Nutch has been around for more than ten years, and it is the beginning of Hadoop.

By the way, we provide training in all these technologies.

Adding text analytics to FreeEed

Many documents in eDiscovery can be understood on a much deeper level than keyword search. Since groups of documents often have a similar structure, one can configure the software to extract additional fields from such documents.

Case study

We have collected all appeal documents from the NY Court of Appeals. For that, we crawled the court website and collected approximately 100,000 documents.

We have then configured the GATE (General Architecture for Text Engineering) tool to extract the information of interest from every document.

Here is the screenshot of GATE screen configured to extract information. It takes a few minutes to extract this information from 100,000 appeal cases, and the output is a CSV file which can be opened as a spreadsheet.

The verify the quality of the information extraction, we watch the statistics. Below is an example of the statistics from one of the latest runs. It shows the percentages of the information being reflected in the case document and successfully extracted by the software.

Files in dir: 111018
Docs processed : 100.0%
Case number: 100.0%
Metadata extracted: 100.0%
Civil: 71.0%
Criminal: 29.0%
Court: 94.7%
Gap days: 92.7%
First date: 92.8%
Appeal date: 100.0%
Judge: 85.8%
Other judges present: 98.4%
District attorney: 61.3%
Assistant district attorney: 100.0%
Crimes: 37.7%
County: 91.7%
Mode of conviction: 53.9%
Keywords: 93.3%
Interest of justice: 4.9%
References to cases: 19.9%
Number of output files: 12
Runtime: 2086 seconds

Our verification assured us that the rate of successful extraction (when the information is actually present) is high.

Below is an example screenshot of the information obtained. The output for all documents (25 MB) can be downloaded from here.









Adding this information to eDiscovery

There are two ways how you can add this information to FreeEed.

  1. The metadata fields can be added to the documents, and FreeEed configured to add them to the review; or
  2. The GATE workflow can be compiled and run directly within FreeEed.

Conclusions

The configuration of the GATE tool is an acquired skill, but even out-of-the-box extractors provide useful information. This work was done as part of Memex DARPA project, and the researchers found the extracted information extremely useful.

By the way, we provide training in all these technologies.

Monday, February 15, 2016

Stoppable Hadoop cluster

The title of this post was inspired by the following lines

They dined on mince, and slices of quince,
   Which they ate with a runcible spoon

from the poem by Edward Lear, "The Owl and the Pussy-Cat", which the reader is invited to ponder at leisure.

Meanwhile, as a Big Data trainer, I often need to create what I would call a "stoppable cluster" on AWS, one that I can "pause," or put to sleep for a while. The most obvious use of it is saving money while the students are away, so that instead of $100/day, I would pay $33 per day. That would be reason enough. However, at times, as a developer, I want to stop the cluster that I am running.

If you look in the literature, it will cite two obstacles:
  1. Ephemeral nodes disappear on stop/start on AWS; and
  2. IP assignments change.
You can fix both by (1) using root drive and EBS drives; and (2) assigning elastic IPs. Amazon will not let you use more than 5 elastic IPs, but you can call them and ask nicely, and they will give you 10. 

Next, Hortonworks Ambari will check the cluster IP assignment and refuse to use the external IPs, even though Amazon promises you the right resolution:


So I use Cloudera manager, stop the cluster, stop the instance, and restart it.

Now, I try to start the Managing services again and....

alas, CM has resolved the IPs to the old internal ones!! And used that in the configuration.

Next installment - constructing proper clusters in the VPC and controlling the internal IP assignments.

Wednesday, December 9, 2015

Data Analytics at the Memex DARPA program with ASPOSE

I am a fan of open source. At DARPA, I work with open source technologies and create more open source as a result. However, when I had to extract information from a PDF police report, I ran into problems for this type of PDF. Here is a fragment of my document.





















Now, you can easily see that the document easily breaks into (field, value) pairs. However, if you copy/paste the text, you get this:

Report no.:
Occurrence Type:
Occurrence time:
Reported time:
Place of offence:
Clearance status:
Concluded:
Concluded date:
Summary:
Remarks:
20131 234567
Impaired Operation/over 80 mg% of Motor Vehicle 253(1)(a)/(b) CC
2013/08/08 20:10 -
2013/08/08 20:10
1072 102 STREET, NORTH BATTLEFORD, SK Canada (CROWN CAB) (Div: F,
Dist: CENTRAL, Det: Battleford Municipal, Zone: BFD, Atom: C)
Cleared by charge/charge recommended
Yes
2013/08/29
Cst. SMITH

As you can see, the formatting is not preserved, and it becomes very hard to parse. I tried 'save as text' and I tried Tika, and I tried PdfBox, and I also asked the Tika people. The result is the same: I get all the text but not the formatting.


Well, comes in Aspose. Close source and with a price tag. But you know what? It is the only one that does the job and gives me the text output in the same format as PDF was.

Here is the code I had to use

    private void initAsposeLicense() {
        com.aspose.pdf.License license = new com.aspose.pdf.License();
        try {
//            ClassLoader classLoader = getClass().getClassLoader();
//            File file = new File(classLoader.getResource("Aspose.Pdf.lic").getFile());
//            InputStream licenseStream = new FileInputStream(file);
//            license.setLicense(licenseStream);
            license.setLicense("Aspose.Pdf.lic");
        } catch (Exception e) {
            logger.error("Aspose license problem", e);
        }
    }

As you can see, I tried to stream the license in. It would be better to distributed to whole jar, but it did not work for some reason. Well, keeping the license outside may be better, since you can replace it. So I just read it from the executable location folder.

Extracting the text was also extremely easy

    private String extractWithAspose(File file) throws IOException {
        // Open document
        com.aspose.pdf.Document pdfDocument = new com.aspose.pdf.Document(file.getPath());

        // Create TextAbsorber object to extract text
        com.aspose.pdf.TextAbsorber textAbsorber = new com.aspose.pdf.TextAbsorber();

        // Accept the absorber for all the pages
        pdfDocument.getPages().accept(textAbsorber);

        // Get the extracted text
        String extractedText = textAbsorber.getText();
//        System.out.println("extractedText=\n" + extractedText);
        return extractedText;
    }

So now I can create a spreadsheet of fields/values for the whole document corpus:

Report no.:|Occurrence Type:|Occurrence time:|Reported time:|Place of offence:|Clearance status:|Concluded:|Concluded date:|Summary:|Remarks:|Associated occurrences:|Involved persons:|Involved addresses:|Involved comm addresses:|Involved vehicles:|Involved officers:|Involved property:|Modus operandi:|Reports:|Supplementary report:
"20131234567"|

Now I can happily proceed with my text analytics tasks.

Wednesday, April 8, 2015

I am a reviewer on "Learning Apache Cassandra"


I am a reviewer on the new Packt Cassandra book.

What You Will Learn


  • Install Cassandra and create your first keyspace
  • Choose the right table structure for the task at hand in a variety of scenarios
  • Use range slice queries for efficient data access
  • Effortlessly handle concurrent updates with collection columns
  • Ensure data integrity with lightweight transactions and logged batches
  • Understand eventual consistency and use the right consistency level for your situation
  • Implement best practices for data modeling and access

Sunday, March 8, 2015

How to add a hard drive to HDFS on AWS

Imagine you need to add more space to your HDFS cluster that is running on Amazon EC2. Here are the simple steps you need to take

1. Add a volume in AWS EC2 console. Make sure that the volume is in the same zone as your instance, such as us-east-1c

2. Attach the volume to the instance: right click on the volume and choose "Attach Volume".

3. Make the volume available for use by formatting the hard drive, commands are here. Now you see the new volume (in my case I mounted 1 TB of space as /disk2)












4. Add this drive as one of those that HDFS should use. I have added the directory for the datanode's use as below






5. Presto! You get much more space. Repeat to taste :)

Wednesday, November 12, 2014

Announcing HBase Design Patterns Book

Happy to announce the "HBase Design Patterns" book, by Mark Kerzner and Sujee Maniyam. The book just went into production and can be pre-ordered using this link: https://www.packtpub.com/big-data-and-business-intelligence/hbase-design-patterns.

The book offers an HBase and NoSQL developer practical guidance in designing and implementing real-world applications. Subjects covered include

  • Various HBase install options
  • Single entity tables
  • Key generation
  • Storing large files
  • Dealing with time series data
  • Advanced modeling
  • Performance optimization
  • A number of labs and exercises

Based on the authors' own work, research and experience gained  in writing the open source book "Hadoop Illuminated." Oh, and did we forget to mention cartoons by RK? Each chapter has at least one.

Cheers,

Mark & Sujee

Sunday, June 22, 2014

I am a reviewer on Apache Solr High Performance book


As always, I acknowledge my colleagues, my friend and partner Sujee, and my multi-talented family.

Next time, more of my friends who always help.

Friday, June 6, 2014

I win another bet

As my friends and students know, I like to make a bet with them, at any time, that there will be some new Big Data development within the next 30 days from the bet.

I think this one qualifies quite well: ElasticSearch just announced that they got funded to the tune of 70 million US dollars: http://www.elasticsearch.com/blog/press/elasticsearch-raises-70-million-series-c-financing/

So why this is big? It shows that not only Big Data infrastructure companies, like Cloudera, who got about 1 billion dollars a month ago, but also more vertically oriented startups are just as important.

Another bet can start today - anyone?

How to build a Hadoop cluster on AWS

Below are some excerpts from a book I am writing. Since this seems to be a matter of general interest, I decided to put this in a blog.

Very often people need to build a Hadoop cluster for work or for fun. There is nothing better than borrowed powerful hardware for this (provided that you don't forget to shut the cluster down when you are done, so head directly to Amazon AWS console:

Sunday, May 11, 2014

Hadoop bootcamp in Dallas this past Friday was a big success

Just look at all the wonderful students. We got to teach one day of the Global Big Data Conference. By now, with our experience of doing the same in Austin and in Santa Clara, it came out really impressive. We covered theory and practice, HDFS and MapReduce, did the labs, and even constructed about sixty individual clusters: each student did his or her own.

From the early morning flight, to the sessions, lunch, snacks, and work - it was a ball!

Tuesday, April 8, 2014

Elephant Scale is Building on the Success of its First Houston Hadoop Bootcamp

Elephant Scale, a provider of Big Data training, implementations, and vertical Hadoop product applications, is pleased to announce that it has successfully completed the first Houston Hadoop Bootcamp.

Lessons learned, future plans and student feedback? - Just go here.

Monday, March 31, 2014

Houston Hadoop Bootcamp was a real success

What was so amazing about our March 28-30 bootcamp? A number of things:

  • We collected more than twenty students altogether (with some remotes and some rescheduling). In the place where nobody could do it (some large companies tried) - there we were able to do it! Houston is just beginning its Big Data journey, and we at Elephant Scale may well be the catalyst taking it forward.
  • We managed to go through the complete training agenda: HDFS, MapReduce, Pig, Hive, HBase, theory and practice. We packaged more real experience here than regular training programs accomplish in ten days. At the end we ran a real mini-hackathon, and each of the three teams was able to complete the SmartMeters project: find smart meter data, download it, collect with Flume into HDFS, and analyze it with Hive.
  • We have formed real friendships, and our team will surely continue to maintain close ties through out LinkedIn Group, Houston Big Data: share news, share leads, and perhaps even work together.  The fact that we took the whole group to lunch every day, at nearby Papasitos or Papadeaux may also have played some role :)
Of course, we have lessons to learn and things to improve, but overall it was an unbelievable experience for all, students and trainers alike. We are already thinking of the next bootcamp on May 2, and of taking Houston Hadoop Bootcamp to Chicago and to Washington, DC.

Our students are proud of their "Excellence in Hadoop" diploma by Elephant Scale, which they can substantiate with real knowledge. 

One student, Guadalupe Hernandez, had this to say, "The bootcamp delivered on all promises and more. The experience was challenging and invigorating!"

Another student, Lila Ghemri, commented: "This was a great experience and great people to learn from and work with. Thanks to all."

Student Buu Vinh said, "It was an incredible experience. Everyone was highly motivated, hard working and helpful to each other in a 3-day super charged weekend. Mark Kerzner and Manish Mehndiratta were knowledgeable and willing to deep dive into questions, or lab work and still were able to complete the entire agenda for the bootcamp. AWESOME!"

Friday, March 7, 2014

Working on the first-ever Hadoop Bootcamp in Houston

Why is Houston special? There is very little of Big Data going in Houston now, and many tried but failed to have a course here. We are succeeding because we are local, and because of our ties with the Houston community.

http://elephantscale.com/bootcamp

Tuesday, February 25, 2014

Removing Hadoop Limitations By Using Persistent Memory Kove® XPD® Device

Removing Hadoop Limitations By Using Persistent Memory Kove® XPD® Device


Mark Kerzner(mark@shmsoft.com), Greg Keller (greg@r-hpc.com), Ivan Lazarov (ivan.lazarov@shmsoft.com)


Abstract


Hadoop cluster stores its most vital information in the RAM of the NameNode server. Although this architecture is vital to fast operation, it represents a single point of failure. To mitigate this, the NameNode’s memory is regularly flushed to hard drives. Consequently, in case of a failure, it takes many hours to restore the cluster to its operation. Another limitation is imposed on Hadoop by the size of the RAM on the NameNode server: Hadoop can store only as much data (files and blocks) as the number of descriptors that can fit in the memory of the NameNode.


The new Hadoop architecture described in this paper removes the size limitation and greatly improves the uptime by running the Hadoop NameNode on a persistent memory device, Kove (www.kove.com) XPD. Its advantages are: no limit on the number of files, no limit on the size of the cluster storage, and faster restore times. The performance of the ruggedized Hadoop cluster is on par with the standard Hadoop configuration.


The Hadoop XPD driver software that achieves this operation is open source, and is freely available for download.

Sunday, February 2, 2014

Big Data, Hadoop, and NoSQL Testing


By Mark Kerzner and Sujee Maniyam, Elephant Scale LLC

Abstract

In this paper we discuss best practices and real world testing strategies for Big Data, Hadoop, and NoSQL. The subjects of testing and software correctness take an even more important role in the world of Big Data, and that is why taking them into account throughout the project lifetime, from design to implementation and to maintenance is paramount. We discuss the maven project organization, the test modules, the use of the mock frameworks, and the TestSuite design pattern. All these serve to factor out extensive copy/pasting into the framework, and in this way to make the projects less error-prone and to improve code quality.

Table of contents
  • Introduction
  • Project organization for test-ability
  • JUnit single unit tests
  • Test modules
  • A word on Scala, Scalding and Kiji
  • System integration testing
  • Conclusion: lessons and further direction
Introduction

Software testing is one of the most important yet often neglected parts of the software development. For this reason, developers have created a list of 20 most popular responses to give when their software fails the tests. Here they are:

20. "That's weird..."
19. "It's never done that before."
18. "It worked yesterday."

Friday, January 31, 2014

Review on "Cassandra Design Patterns" book


A new book by Packt, on which I am a reviewer. Also, see my Amazon review for it here.

Thursday, January 9, 2014

Hadoop Operations and Cluster Management Cookbook from Packt

I am reviewer on this book, , and here is what I say on Amazon about it:

The book talks about every aspect of Hadoop administration: choice of hardware/software, installation of Hadoop and all the tools, Pig, Hive, Mahout, etc. There are chapters on maintenance and monitoring. Lots of screen shots and command-line instructions.

I wish the book showed the latest developments in these areas, which are Cloudera Manager, HortonWorks Ambari, etc., which make it all ridiculously simple. However, when those managers fail or are not supported, you are still back on the command line, so this approach definitely has its place.

I especially liked the monitoring chapters, nagious, Ganglia and Ambari.

Thursday, December 12, 2013

Hadoop at Dell World 2013

One bright morning I found myself in Austin, at the Dell World 2013.

Austin is a great and fun place.

But at the conference they all talk about Hadoop! I met so many new Hadoop friends. And what awesome servers!