The weapon had been bought, the judge said, because of the defendant's fear of his ex-partner's former boyfriend.
The Australian father of two had only been back in New Zealand a week and was temporarily living with his ex-partner at Taieri Mouth on the morning of February 21.
The pair argued about Roker's alleged drug use and the victim started to move his belongings outside before the situation deteriorated.
Defence counsel Anne Stevens said her client had been tested immediately after the incident and had no illegal drugs in his system.
She also told the court he had lost two fingers while he was working for Delta in Dunedin in 2013.
According to Otago Daily Times records, Roker was a member of Delta's Dunedin Greenspace team and was using a petrol-powered hedge trimmer while standing on a ladder when he lost his balance and fell backwards.
"As he was falling, he reached out with his left hand to regain control of the petrol-powered hedge trimmer that was falling towards him," a leaked company report said.
"He missed catching hold of the handle and his hand contacted the cutting bar."
The accident left the man with partially amputated middle and little fingers on his left hand.
The violence in February began when Roker elbowed his former partner in the head and then hit her with an open hand, the court heard.
When the victim's father came home two hours later and heard them arguing, he told the man to leave.
Roker was "ranting" about who was at fault before he pounced on the man.
The pair wrestled on the floor of the lounge, with the victim gaining the upper hand and repelling the defendant.
Roker ran from the house but returned moments later.
"He removed a large machete from his belongings, raised it above his head and ran at both victims who had followed him down the landing," a summary said.
Roker swung for the man's head but the victim raised his left arm to block it.
"The machete sliced through the victim's arm, severing it just above the left wrist," the court heard.
Later, Roker smashed a glass panel to the bathroom where the father and daughter had been treating his wound.
However, the court heard he "calmed down" and provided first aid.
The victim required extensive reconstructive surgery, Justice Gendall said, but the "long-term efficacy remains unclear".
Stevens said the background to the incident was key.
Roker had only left Australia to rejoin his ex-partner at her request.
"Unfortunately he arrived to a somewhat volatile situation," she said.
Stevens described him as someone of "good character" and the court heard that though the defendant had previous convictions, they were driving offences rather than violence.
Roker's mother had come over from Australia for Monday's sentencing. His father had died of cancer while he was on remand.
Justice Gendall ordered Roker pay $2000 to the victims for the emotional harm caused.
A minimum non-parole period, requested by the Crown, was declined by the judge.