Instructions:
1. Write a MapReduce program to find the frequency of each letter,
case insensitive, in some given input. For example, "The quick
brown fox jumps over the lazy dog" as input should generate the
following (letter,count) pairs: (T, 2), (H, 1), (E, 3), etc.
2. Test your program against the 3 attached input files: HadoopFile0.txt, HadoopFile1.txt, and HadoopFile2.txt.
3. The input and output must be read/written from/into HDFS.
4. Please submit only the Java source file(s) on .
5. I've attached the WordCount.java as a sample
MapReduce program. You might find it useful.
WordCount.java ::
import java.io.IOException;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Job;
import
org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
import
org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
import org.apache.hadoop.mapreduce.Mapper;
import org.apache.hadoop.mapreduce.Reducer;
public class WordCount
{
public static void main(String[] args)
throws Exception {
if (args.length != 2) {
System.err.println("Usage: WordCount <input path> <output
path>");
System.exit(-1); }
Job job = Job.getInstance(); job.setJarByClass(WordCount.class);
job.setJobName("Word Count");
//job.setNumReduceTasks(2); FileInputFormat.addInputPath(job, new
Path(args[0])); FileOutputFormat.setOutputPath(job, new
Path(args[1])); job.setMapperClass(WordMapper.class);
job.setReducerClass(WordReducer.class);
job.setOutputKeyClass(Text.class);
job.setOutputValueClass(IntWritable.class);
System.exit(job.waitForCompletion(true) ? 0 : 1);
}
public static class WordMapper
extends Mapper<LongWritable, Text, Text, IntWritable> {
public void map(LongWritable key, Text value, Context
context)
throws IOException, InterruptedException {
String line = value.toString().toLowerCase(); String[] tokens =
line.split("\\W+");
for (String token : tokens) {
if (token.length() > 0)
context.write(new Text(token), new IntWritable(1));
}
}
}
public static class WordReducer
extends Reducer<Text, IntWritable, Text, IntWritable> {
public void reduce(Text key, Iterable<IntWritable> values,
Context context)
throws IOException, InterruptedException {
int count = 0;
for (IntWritable value : values) {
count += value.get();
}
context.write(key, new IntWritable(count));
}
}
}
Hadoopfile0.txt::
Hadoop is the Elephant King!
A yellow and elegant thing.
He never forgets
Useful data, or lets
An extraneous element cling!
Hadoopfile1.txt::
A wonderful king is Hadoop.
The elephant plays well with Sqoop.
But what helps him to thrive
Are Impala, and Hive,
And HDFS in the group.
Hadoopfile2.txt::
Hadoop is an elegant fellow.
An elephant gentle and mellow.
He never gets mad, Or does anything bad,
Because, at his core, he is yellow.
In: Computer Science
The unadjusted trial balance of Epicenter Laundry at June 30, 2016, the end of the fiscal year, follows:
Epicenter Laundry
UNADJUSTED TRIAL BALANCE
June 30, 2016
| ACCOUNT TITLE | DEBIT | CREDIT | |
|---|---|---|---|
|
1 |
Cash |
11,000.00 |
|
|
2 |
Laundry Supplies |
21,500.00 |
|
|
3 |
Prepaid Insurance |
9,600.00 |
|
|
4 |
Laundry Equipment |
232,600.00 |
|
|
5 |
Accumulated Depreciation |
125,400.00 |
|
|
6 |
Accounts Payable |
11,800.00 |
|
|
7 |
Wages Payable |
||
|
8 |
Common Stock |
40,000.00 |
|
|
9 |
Retained Earnings |
65,600.00 |
|
|
10 |
Dividends |
10,000.00 |
|
|
11 |
Income Summary |
||
|
12 |
Laundry Revenue |
232,200.00 |
|
|
13 |
Wages Expense |
125,200.00 |
|
|
14 |
Rent Expense |
40,000.00 |
|
|
15 |
Utilities Expense |
19,700.00 |
|
|
16 |
Laundry Supplies Expense |
||
|
17 |
Depreciation Expense |
||
|
18 |
Insurance Expense |
||
|
19 |
Miscellaneous Expense |
5,400.00 |
|
|
20 |
Totals |
475,000.00 |
475,000.00 |
The data needed to determine year-end adjustments are as follows:
| • | Laundry supplies on hand at June 30 are $3,600. | |||||||||
| • | Insurance premiums expired during the year are $5,700. | |||||||||
| • | Depreciation of laundry equipment during the year is $6,500. | |||||||||
| • |
Wages accrued but not paid at June 30 are $1,100.
|
In: Accounting
SAS Enterprise Miner Exersice
Chapter 8 – Pattern Discovery Association
1. Conducting an Association Analysis
A store is interested in determining the associations between items purchased from the Health and Beauty Aids Department and the Stationery Department. The store chose to conduct a market basket analysis of specific items purchased from these two departments. The TRANSACTIONSdata set contains information about more than 400,000 transactions made over the past three months. The following products are represented in the data set:
bar soap
bows
candy bars
deodorant
greeting cards
magazines
markers
pain relievers
pencils
pens
perfume
photo processing
prescription medications
shampoo
toothbrushes
toothpaste
wrapping paper
There are four variables in the data set:
|
Name |
Model Role |
Measurement Level |
Description |
|
STORE |
Rejected |
Nominal |
Identification number of the store |
|
TRANSACTION |
ID |
Nominal |
Transaction identification number |
|
PRODUCT |
Target |
Nominal |
Product purchased |
|
QUANTITY |
Rejected |
Interval |
Quantity of this product purchased |
2. Create a new diagram. Name the diagram Ch_08_Assoc_Transactions.
3. Create a new data source. Use the data set AAEM.TRANSACTIONS.
4. Assign the model role Rejected to the variables STORE and QUANTITY. These variables are not used in this analysis. Assign the ID model role to the variable TRANSACTION and the Target model role to the variable PRODUCT.
5. Add the node for the TRANSACTIONS data set and an Association node to the diagram.
6. Change the setting for Export Rule by ID to Yes.
7. Do not change the remaining default settings for the Association node and run the analysis.
8. Examine the results of the association analysis.
What is the highest lift value for the resulting rules?
Which rule has this value?
Identify all rules that have a Lift greater than 2.0. For each rule, provide the Support, Confidence, Expected Confidence, Lift, and the actual Rule.
For any two different rules (i.e., not symmetric) with a lift greater than 2.0, for each rule:
Provide an explanation of why you think this rule makes sense
Three different methods that a store manager can use this rule to increase their profit on the related products.
9. The submittal for this chapter will be a Word document containing the screen shots captured. Make sure to clearly label each of the screen shots to explain the purpose of the screen shot.
10. Additionally, as you generate results using SAS Enterprise Miner, you need to explain your results from a business perspective. This means that you need to explain the results in non-technical terms as well as the business implications of the results.
In: Operations Management
One of the items that businesses would like to be able to test is whether or not a change they make to their procedures is effective. Remember that when you create a hypothesis and then test it, you have to take into consideration that some variance between what you expect and what you collect as actual data is because of random chance. However, if the difference between what you expect and what you collect is large enough, you can more readily say that the variance is at least in part because of some other thing that you have done, such as a change in procedure.
For this submission, you will watch a video about the Chi-square test. This test looks for variations between expected and actual data and applies a relatively simple mathematical calculation to determine whether you are looking at random chance or if the variance can be attributed to a variable that you are testing for.
Imagine that a company wants to test whether it is a better idea to assign each sales representative to a defined territory or allow him or her to work without a defined territory. The company expects their sales reps to sell the same number of widgets each month, no matter where they work. The company creates a null and alternate hypothesis to test sales from defined territory sales versus open sales.
One of the best ways to test a hypothesis is through a Chi-square test of a null hypothesis. A null hypothesis looks for there to be no relationship between two items. Therefore, the company creates the following null hypothesis to test: There is no relationship between the amount of sales that a representative makes and the type of territory (defined or open) that a representative works in. The alternate hypothesis would be the following: There is a relationship between the kind of sales territory a sale representative has (defined or open) and the amount of sales he or she makes during a month.
Step 1:
Watch this video.
Step 2:
Use the following data to conduct a Chi-square test for each region of the company in the same manner you viewed in the video:
| Region | Expected |
Actual |
|---|---|---|
| Southeast | ||
|
Defined |
100 | 98 |
|
Open |
100 | 104 |
| Northeast | ||
|
Defined |
150 | 188 |
|
Open |
150 | 214 |
| Midwest | ||
|
Defined |
125 | 120 |
|
Open |
125 | 108 |
| Pacific | ||
|
Defined |
200 | 205 |
|
Open |
200 | 278 |
Step 3:
Write an 800–1,000-word essay, utilizing APA formatting, to discuss the following:
In: Math
Scenario You are the senior event services manager for a 12,000-seat arena located on a major university campus in the southeastern United States. The university’s athletics teams compete in the powerful Atlantic Coast Conference (ACC). On this particular Saturday afternoon, the university men’s basketball team is playing a home game against one of its fiercest ACC rivals. In fact, the visiting team is the defending NCAA national champion and the fans were in a frenzied state for this game when you opened the doors. This televised marquee match-up is sold out. The game has commenced as tip-off was scheduled at 3:08 p.m. EST. As halftime approaches, the power goes out as a result of an automobile accident that knocked out a major electrical transformer. To the best of your knowledge, the power is out all across campus, as well as in the nearby surrounding neighborhoods. The campus police officers on duty have received word that the power will most likely not be restored for several hours. The majority of the campus police on duty in the arena have been directed to take other posts on campus to assist with traffic control and to protect some the highly sensitive research venues on campus. The operations manager reports that while the emergency generator started up and there is emergency lighting, for some reason the public address system is not working even though it is connected to the generator. You are the senior manager on-site and are responsible for decision-making and leading your staff in addressing this dilemma. The campus police have previously agreed that the decision whether or not to evacuate the venue during any event is ultimately the responsibility of the arena’s senior manager on-site during any emergency situation.
Assignment Emergency planning is an ongoing activity that should involve every department within a venue. From the event manager’s point of view, emergency preparedness takes on heightened importance during events because of the high stakes in a venue occupied by many people. The event manager must have the knowledge and competence to carry out emergency responses if necessary. In addition to venue management staff, emergency response will include appropriate actions from a broad range of venue occupants, including event staff (such as ushers and security personnel), medical staff, police, and fire officials. The emergency plan should include a chain of command protocol that includes an incident command system specifying who is in charge. Please answer the following questions as thoroughly as possible:
1. What is the first action you must take in this situation?
2. What instructions do you give to your on-site staff?
3. How do you communicate with the fans without the public address system?
4. How do you handle questions from fans regarding continuation of the game?
In: Operations Management
In: Finance
Read the following case and answer the question at the end:
As Zappos made its push toward holocracy, Hsieh decided to ramp
up the efforts to an even higher level: Teal. Hsieh sent out a
4,700 word e-mail to all employees entitled “Reinventing Zappos:
The Road to Teal.” Teal, supposed to be the next stage of
development after holocracy, is characterized as “A new kind of
organization designed to enable ‘whole’ individuals (not narrow
professional selves) to self-organize and self-manage to achieve an
organic organizational purpose.” In the memo, Hsieh essentially
told the remaining employees to get on board or get out. Hsieh was
not happy with the progress that had been made up to that point and
wrote, “in order to eliminate the legacy management hierarchy,
there will be effectively no more people managers.” John Bunch, the
employee in charge of the move to teal says, “Teal is the goal;
holocracy is the system.”
Hsieh even went as far as to offer the equivalent of three months’
worth of salary to employees who would quit the organization if
they didn’t feel they could fit in. Over 200 employees (14 percent)
took him up on the offer—a massive number of people given Zappos’s
normal turnover rate of 1 percent annually. Clearly, not everyone
felt comfortable in an organization with no clear leadership
structure and very little to no legitimate power. One departed
employee called holocracy “a social experiment [that] created chaos
and uncertainty.” Others felt like “more employees are feeling like
favoritism [and management issues are] becoming a bigger problem.”
CEO Tony Hsieh remains undaunted. Hsieh says, “The one thing I’m
absolutely sure of is that the future is about
self-management.”
The move has not been bad for everyone. Less experienced
individuals with less expertise have felt energized by their
ability to speak up and have a voice. One employee whose prior boss
blocked a job transfer stated that as soon as he figured holocracy
out, “I was like, ‘Actually, my boss can’t tell me that.’” Jake
McCrea, who teaches new hires about Zappos culture, states,
“Holacracy is like a sport or a new language. You can read about
it, you can hear people tell you about it, you won’t understand it
until you start using it.” Even through all the issues, Hsieh
stated, “I’ve been surprised at how hard it is to let go of the
psychological baggage. In retrospect, I would have probably ripped
off the Band-Aid sooner.”
Do you think leadership skills would be more or less important at Zappos under holocracy? How so?
In: Psychology
Create an ArrayListReview class with one data field of ArrayList and one with LinkedList with the generic type passed to the class. (2 point) 2. Create a constructor that populate an array list and the LinkedList filled with the generic type through inserting new elements into the specified location index-i in the list. (2 points) 3. You have been given the job of creating a new order processing system for the Yummy Fruit CompanyTM. The system reads pricing information for the various delicious varieties of fruit stocked by YFC, and then processes invoices from customers, determining the total amount for each invoice based on the type and quantity of fruit for each line item in the invoice. The program input starts with the pricing information. Each fruit price (single quantity) is specified on a single line, with the fruit name followed by the price. You can assume that each fruit name is a single word consisting of alphabetic characters (A–Z and a–z). You can also assume that prices will have exactly two decimal places after the decimal point. Fruit names and prices are separated by a single space character. The list of fruit prices is terminated by a single line consisting of the text END_PRICES. After the fruit prices, there will be one or more invoices. Each invoice consists of a series of line items. A line item is a fruit name followed by an integer quantity, with the fruit name and quantity separated by a single space. You can assume that no line item will specify a fruit name that is not specified in the fruit prices. Each invoice is terminated by a line consisting of the text END_INVOICE. As a special case, if a line with the text QUIT appears instead of the beginning of an invoice, the program should exit immediately. The overall input will always be terminated by a QUIT line. (5 points) Example input: orange 0.80 pomegranate 2.50 plum 1.20 peach 1.00 persimmon 1.75 lime 0.60 END_PRICES persimmon 2 orange 3 peach 1 plum 10 pomegranate 5 END_INVOICE peach 11 plum 5 orange 1 lime 9 END_INVOICE QUIT For each invoice, the program should print a single line of the form Total: X.YY where X.YY is the total cost of the invoice, which is the sum of the costs of all of the line items in the invoice. The cost should be printed with exactly two digits after the decimal point. Example output (corresponding to the input shown above): Total: 31.40 Total: 23.20 4. Implement insertionSort. (8 points) 5. Write the code to the No. 50 Fibonacci number. (2 points) 6. Write the main method to test your program and use System.nanoTime() to find out the speed of each step of your program. (1 point)
In: Computer Science
Question 1
What are some methods or practices to rationally and effectively discuss issues and resolve conflict?(What would your plan be to determine if the undesired patient outcomes are related to policy, related toprocedure, or related to some other issue?
Question 2
What are the differences between the Personnel Policy Manual and the Employee Guide?
Question 3
How do you plan to create procedures from policies?
Question 4
What kind of tools would you use to create procedures?
Question 5
How do you determine if each manager is up to date with the policies and procedures?
Question 6
How often should policies and procedures be updated?
Question 7
Who performs the updates to policies and procedures?
In your own words, ( not an answer from the same question on chegg) Select one issue from the Transitional Care scenario in the Allied Health Community and write a new policy and procedure related to the issue. Write a 500-word memo to your supervisor that describes this issue and an explanation of how the new policy and procedure will resolve the issue. In the memo, include a draft of the policy and procedure. Be sure to include the research on industry standards that helped you formulate the policy and procedure.
Scenario: As the Director of Human Resources at a transitional health care organization, you are charged with the overall administration of over 700 health care professional employees. This transitional health care organization is currently celebrating its 40th year in the community and serves as a model organization envied by local competitors. As the Director of Human Resources, you are responsible for hiring, orientation, training and development, compensation and benefits, and employee relations. Given the long existence of the organization, there have been many instances where management has been tasked with creating or modifying the company personnel policies and procedures. You have recently met with the CEO regarding some topics related to human resources, including the concern that the facility is experiencing some complaints regarding management, especially in the area of employee-related adverse actions. Some employees complain that they are being unfairly singled out for corrective actions and progressive discipline. They claim that current policies are being unfairly administered and some of the policies are out of date. Additionally, there have been too many medication errors and harmful patient treatments by the nursing staff that have resulted in nursing management creating new policies and procedures in an effort to fix immediate issues. The CEO has directed you to resolve these issues. Given the above scenario, respond to each question with and include references to support your proposed solution.
In: Operations Management
Read the "Home Care Scenario: Quality Improvement Through Risk Management," located in the Allied Health Community. Be sure to review the Instructions and Legend information.
In a total of 250-500 words, respond to the questions located in the Home Care Scenario.
Prepare this assignment according to the guidelines found in the APA Style Guide, located in the Student Success Center.
This assignment uses a rubric. Please review the rubric prior to beginning the assignment to become familiar with the expectations for successful completion.
HOME CARE SCENARIO: Quality Improvement through Risk Management
Scenario
The long-term care center has 225 beds and provides the highest level of patient care, according to ongoing Department of Health Services annual surveys. The Director of the long-term center has the overall responsibility of ensuring the continuing high level of quality outcomes while also concurrently keeping the facility as risk free as practical. You and the Director have just returned from an annual Long-Term Care Association symposium where you were both introduced to some new groundbreaking initiatives regarding the differences between risk management and quality improvement.
Earlier in the week, the Director called for a meeting of the center’s department managers, including the Quality Assurance Nurse and the Manager of Risk Management. After briefing them on the symposium talking points, your Director asks you to come up with a working plan and strategy for how the facility will use both of the concepts you have introduced to arrive at a more centralized and standardized approach. Overall, the desired outcomes focus on adopting a new approach to higher quality with fewer risk factors for the organization.
Later that week, the Manager of Risk Management, the Manager of Nursing Quality Assurance, and a representative from Human Resources met to formulate a new plan to reduce the litigation exposure while concurrently increasing the quality of patient outcomes. They set about the complex set of tasks with the expectation that you, as the Director’s designated facilitator, will be closely reviewing their final recommendations.
Provide a 250-word executive summary of the research project and recommended plan of action that you will provide to the Director.
Address the following:
Questions:
1.What is the necessary background information needed to complete your executive summary?Who are the stakeholders?
2. How do the facility’s current Continuous Quality Improvement (CQI) outcomes correspond with the current litigation prevention systems?
3.What factors within the nursing units are the most critical to consider when examining higher quality outcomes?
4.What factors within the nursing units are the most critical to consider when examining lower litigation adverse actions and operational impact?
5.What future steps must be taken to accomplish this directive?
In: Operations Management